[ 'model' => \Bixo\Product\Models\Description::class, 'table' => 'bixo_product_descriptions', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['type', 'category', 'language', 'portal_id', 'description', 'user_id', 'user_type'], 'translatables' => [], 'upload_folder' => 'product/description', '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" => "type", "type" => "text", "label" => 'product::description.label.type', 'sort' => true, 'roles' => [], ], [ "key" => "category", "type" => "text", "label" => 'product::description.label.category', 'sort' => true, 'roles' => [], ], [ "key" => "language", "type" => "text", "label" => 'product::description.label.language', 'sort' => true, 'roles' => [], ], [ "key" => "portal_id", "type" => "text", "label" => 'product::description.label.portal_id', 'sort' => true, 'roles' => [], ], [ "key" => "description", "type" => "text", "label" => 'product::description.label.description', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'type', "element" => 'text', "type" => 'text', "label" => 'product::description.label.type', "placeholder" => 'product::description.placeholder.type', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'category', "element" => 'text', "type" => 'text', "label" => 'product::description.label.category', "placeholder" => 'product::description.placeholder.category', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'language', "element" => 'text', "type" => 'text', "label" => 'product::description.label.language', "placeholder" => 'product::description.placeholder.language', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'portal_id', "element" => 'numeric', "type" => 'numeric', "label" => 'product::description.label.portal_id', "placeholder" => 'product::description.placeholder.portal_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'description', "element" => 'text', "type" => 'text', "label" => 'product::description.label.description', "placeholder" => 'product::description.placeholder.description', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'product/description/new', 'method' => 'GET', ], 'create' => [ 'url' => 'product/description/create', 'method' => 'GET', ], 'store' => [ 'url' => 'product/description', 'method' => 'POST', ], 'update' => [ 'url' => 'product/description', 'method' => 'PUT', ], 'list' => [ 'url' => 'product/description', 'method' => 'GET', ], 'delete' => [ 'url' => 'product/description', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'product::description.label.created_at', 'name' => 'product::description.label.name', 'status' => 'product::description.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "product::description.groups.main", 'group' => "main.main", 'title' => "product::description.groups.main", ], [ 'icon' => "fe:home", 'name' => "product::description.groups.details", 'group' => "main.details", 'title' => "product::description.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "product::description.groups.images", 'group' => "main.images", 'title' => "product::description.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "product::description.groups.settings", 'group' => "main.settings", 'title' => "product::description.groups.settings", ] ], 'controller' => [ 'provider' => 'Bixo', 'package' => 'Product', 'module' => 'Description', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Bixo\Product\Models\Description::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' => 'product::description.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['product.description.copy', 'product.description.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'product::description.label.count', "placeholder" => 'product::description.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" => 'product::description.label.comment', "placeholder" => 'product::description.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'product::description.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'product::description.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];