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