[ 'model' => \Bixo\Asset\Models\Asset::class, 'table' => 'bixo_asset_assets', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['category', 'sub_category', 'name', 'serial_no', 'tags', 'brand', 'model_no', 'ram', 'storage', 'imei_no', 'ip_address', 'current_location', 'purchased_from', 'previous_state', 'purchased_date', 'warranty_start_date', 'warranty_end_date', 'assign_to', 'previous_owner', 'assign_date', 'return_date', 'photo', 'history', 'user_id', 'user_type'], 'translatables' => [], 'upload_folder' => 'asset/asset', 'uploads' => [ /* 'images' => [ 'count' => 10, 'type' => 'image', ], 'file' => [ 'count' => 1, 'type' => 'file', ], */ ], 'casts' => [ 'marking' => 'array', /* 'images' => 'array', 'file' => 'array', */ ], 'revision' => [], 'perPage' => '20', 'search' => [ 'name' => 'like', 'status', ] ], 'search' => [ ], 'list' => [ [ "key" => "category", "type" => "text", "label" => 'asset::asset.label.category', 'sort' => true, 'roles' => [], ], [ "key" => "sub_category", "type" => "text", "label" => 'asset::asset.label.sub_category', 'sort' => true, 'roles' => [], ], [ "key" => "name", "type" => "text", "label" => 'asset::asset.label.name', 'sort' => true, 'roles' => [], ], [ "key" => "serial_no", "type" => "text", "label" => 'asset::asset.label.serial_no', 'sort' => true, 'roles' => [], ], [ "key" => "tags", "type" => "text", "label" => 'asset::asset.label.tags', 'sort' => true, 'roles' => [], ], [ "key" => "brand", "type" => "text", "label" => 'asset::asset.label.brand', 'sort' => true, 'roles' => [], ], [ "key" => "model_no", "type" => "text", "label" => 'asset::asset.label.model_no', 'sort' => true, 'roles' => [], ], [ "key" => "ram", "type" => "text", "label" => 'asset::asset.label.ram', 'sort' => true, 'roles' => [], ], [ "key" => "storage", "type" => "text", "label" => 'asset::asset.label.storage', 'sort' => true, 'roles' => [], ], [ "key" => "imei_no", "type" => "text", "label" => 'asset::asset.label.imei_no', 'sort' => true, 'roles' => [], ], [ "key" => "ip_address", "type" => "text", "label" => 'asset::asset.label.ip_address', 'sort' => true, 'roles' => [], ], [ "key" => "current_location", "type" => "text", "label" => 'asset::asset.label.current_location', 'sort' => true, 'roles' => [], ], [ "key" => "purchased_from", "type" => "text", "label" => 'asset::asset.label.purchased_from', 'sort' => true, 'roles' => [], ], [ "key" => "previous_state", "type" => "text", "label" => 'asset::asset.label.previous_state', 'sort' => true, 'roles' => [], ], [ "key" => "purchased_date", "type" => "text", "label" => 'asset::asset.label.purchased_date', 'sort' => true, 'roles' => [], ], [ "key" => "warranty_start_date", "type" => "text", "label" => 'asset::asset.label.warranty_start_date', 'sort' => true, 'roles' => [], ], [ "key" => "warranty_end_date", "type" => "text", "label" => 'asset::asset.label.warranty_end_date', 'sort' => true, 'roles' => [], ], [ "key" => "assign_to", "type" => "text", "label" => 'asset::asset.label.assign_to', 'sort' => true, 'roles' => [], ], [ "key" => "previous_owner", "type" => "text", "label" => 'asset::asset.label.previous_owner', 'sort' => true, 'roles' => [], ], [ "key" => "assign_date", "type" => "text", "label" => 'asset::asset.label.assign_date', 'sort' => true, 'roles' => [], ], [ "key" => "return_date", "type" => "text", "label" => 'asset::asset.label.return_date', 'sort' => true, 'roles' => [], ], [ "key" => "photo", "type" => "text", "label" => 'asset::asset.label.photo', 'sort' => true, 'roles' => [], ], [ "key" => "history", "type" => "text", "label" => 'asset::asset.label.history', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'category', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.category', "placeholder" => 'asset::asset.placeholder.category', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'sub_category', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.sub_category', "placeholder" => 'asset::asset.placeholder.sub_category', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'name', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.name', "placeholder" => 'asset::asset.placeholder.name', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'serial_no', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.serial_no', "placeholder" => 'asset::asset.placeholder.serial_no', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'tags', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.tags', "placeholder" => 'asset::asset.placeholder.tags', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'brand', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.brand', "placeholder" => 'asset::asset.placeholder.brand', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'model_no', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.model_no', "placeholder" => 'asset::asset.placeholder.model_no', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'ram', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.ram', "placeholder" => 'asset::asset.placeholder.ram', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'storage', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.storage', "placeholder" => 'asset::asset.placeholder.storage', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'imei_no', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.imei_no', "placeholder" => 'asset::asset.placeholder.imei_no', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'ip_address', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.ip_address', "placeholder" => 'asset::asset.placeholder.ip_address', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'current_location', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.current_location', "placeholder" => 'asset::asset.placeholder.current_location', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'purchased_from', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.purchased_from', "placeholder" => 'asset::asset.placeholder.purchased_from', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'previous_state', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.previous_state', "placeholder" => 'asset::asset.placeholder.previous_state', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'purchased_date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'asset::asset.label.purchased_date', "placeholder" => 'asset::asset.placeholder.purchased_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'warranty_start_date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'asset::asset.label.warranty_start_date', "placeholder" => 'asset::asset.placeholder.warranty_start_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'warranty_end_date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'asset::asset.label.warranty_end_date', "placeholder" => 'asset::asset.placeholder.warranty_end_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'assign_to', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.assign_to', "placeholder" => 'asset::asset.placeholder.assign_to', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'previous_owner', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.previous_owner', "placeholder" => 'asset::asset.placeholder.previous_owner', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'assign_date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'asset::asset.label.assign_date', "placeholder" => 'asset::asset.placeholder.assign_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'return_date', "element" => 'date_picker', "type" => 'date_picker', "label" => 'asset::asset.label.return_date', "placeholder" => 'asset::asset.placeholder.return_date', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'photo', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.photo', "placeholder" => 'asset::asset.placeholder.photo', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'history', "element" => 'text', "type" => 'text', "label" => 'asset::asset.label.history', "placeholder" => 'asset::asset.placeholder.history', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'asset/asset/new', 'method' => 'GET', ], 'create' => [ 'url' => 'asset/asset/create', 'method' => 'GET', ], 'store' => [ 'url' => 'asset/asset', 'method' => 'POST', ], 'update' => [ 'url' => 'asset/asset', 'method' => 'PUT', ], 'list' => [ 'url' => 'asset/asset', 'method' => 'GET', ], 'delete' => [ 'url' => 'asset/asset', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'asset::asset.label.created_at', 'name' => 'asset::asset.label.name', 'status' => 'asset::asset.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "asset::asset.groups.main", 'group' => "main.main", 'title' => "asset::asset.groups.main", ], [ 'icon' => "fe:home", 'name' => "asset::asset.groups.details", 'group' => "main.details", 'title' => "asset::asset.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "asset::asset.groups.images", 'group' => "main.images", 'title' => "asset::asset.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "asset::asset.groups.settings", 'group' => "main.settings", 'title' => "asset::asset.groups.settings", ] ], 'controller' => [ 'provider' => 'Bixo', 'package' => 'Asset', 'module' => 'Asset', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Bixo\Asset\Models\Asset::class, ], 'places' => [ 'Draft', 'Pending', 'Approved', 'Closed', 'Published', 'Archived', 'Unpublished', ], 'initial_places' => ['Draft'], 'transitions' => [ 'submit' => [ 'from' => 'Draft', 'to' => 'Pending', 'metadata' => [ 'roles' => [ 'user' => ['*'], ], 'rules' => [ 'name' => 'required', ] ], ], 'reject' => [ 'from' => 'Pending', 'to' => 'Draft', 'metadata' => [ 'roles' => [ 'user' => ['superuser'], 'team' => ['admin', 'manager'], ], 'form' => [ 'title' => 'Reject', 'button' => [ 'cancel' > [ 'icon' > '', 'varient' > '', 'label' > 'Cancel' ], 'submit' > [ 'icon' > '', 'varient' > 'primary', 'label' > 'Reject' ] ], 'fields' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'advert::advert.label.count', "placeholder" => 'advert::advert.placeholder.count', "options" => call_user_func(function () { return [ 1 => ['value' => 1, 'text' => 1], 2 => ['value' => 2, 'text' => 2], 3 => ['value' => 3, 'text' => 3], 4 => ['value' => 4, 'text' => 4], ]; }), "col" => "12", ], 'comment' => [ "element" => 'textarea', "type" => 'text', "required" => 'required', "label" => 'advert::advert.label.comment', "placeholder" => 'advert::advert.placeholder.comment', "col" => "12", ], ], ], ], ], 'approve' => [ 'from' => 'Pending', 'to' => 'Approved', 'metadata' => [ 'roles' => [ 'user' => ['superuser'], 'team' => ['admin', 'manager'], ] ], ], 'publish' => [ 'from' => ['Approved', 'Unpublished'], 'to' => 'Published', 'metadata' => [ 'roles' => [ 'user' => ['superuser'], 'team' => ['admin'], ] ], ], 'unpublish' => [ 'from' => ['Published'], 'to' => 'Unpublished', 'metadata' => [ 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], ] ], ], 'archive' => [ 'from' => ['Published', 'Unpublished'], 'to' => 'Archived', 'metadata' => [ 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], ] ], ], 'unarchive' => [ 'from' => ['Archived'], 'to' => 'Draft', 'metadata' => [ 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], ] ], ], ], ], 'actions' => [ 'copy' => [ 'type' => ['Details', 'List'], 'label' => 'asset::asset.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['asset.asset.copy', 'asset.asset.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'asset::asset.label.count', "placeholder" => 'asset::asset.placeholder.count', "options" => call_user_func(function () { return [ 1 => ['value' => 1, 'text' => 1], 2 => ['value' => 2, 'text' => 2], 3 => ['value' => 3, 'text' => 3], 4 => ['value' => 4, 'text' => 4], ]; }), "col" => "12", ], 'comment' => [ "element" => 'textarea', "type" => 'text', "required" => 'required', "label" => 'asset::asset.label.comment', "placeholder" => 'asset::asset.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'asset::asset.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'asset::asset.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];