[ 'model' => \Litecms\Account\Models\Product::class, 'table' => 'litecms_account_products', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['name', 'description', 'tax_rate', 'price', 'purchase_coa', 'sales_coa', 'status', 'user_id', 'user_type'], 'translatables' => [], 'upload_folder' => 'account/product', 'uploads' => [ /* 'images' => [ 'count' => 10, 'type' => 'image', ], 'file' => [ 'count' => 1, 'type' => 'file', ], */ ], 'casts' => [ /* 'images' => 'array', 'file' => 'array', */ ], 'revision' => [], 'perPage' => '20', 'search' => [ 'name' => 'like', 'status', ] ], 'search' => [ ], 'list' => [ [ "key" => "name", "type" => "text", "label" => 'account::product.label.name', 'sort' => true, 'roles' => [], ], [ "key" => "description", "type" => "text", "label" => 'account::product.label.description', 'sort' => true, 'roles' => [], ], [ "key" => "tax_rate", "type" => "text", "label" => 'account::product.label.tax_rate', 'sort' => true, 'roles' => [], ], [ "key" => "price", "type" => "text", "label" => 'account::product.label.price', 'sort' => true, 'roles' => [], ], [ "key" => "purchase_coa", "type" => "text", "label" => 'account::product.label.purchase_coa', 'sort' => true, 'roles' => [], ], [ "key" => "sales_coa", "type" => "text", "label" => 'account::product.label.sales_coa', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'name', "element" => 'text', "type" => 'text', "label" => 'account::product.label.name', "placeholder" => 'account::product.placeholder.name', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'description', "element" => 'text', "type" => 'text', "label" => 'account::product.label.description', "placeholder" => 'account::product.placeholder.description', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'tax_rate', "element" => 'decimal', "type" => 'decimal', "label" => 'account::product.label.tax_rate', "placeholder" => 'account::product.placeholder.tax_rate', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'price', "element" => 'decimal', "type" => 'decimal', "label" => 'account::product.label.price', "placeholder" => 'account::product.placeholder.price', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'purchase_coa', "element" => 'numeric', "type" => 'numeric', "label" => 'account::product.label.purchase_coa', "placeholder" => 'account::product.placeholder.purchase_coa', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'sales_coa', "element" => 'numeric', "type" => 'numeric', "label" => 'account::product.label.sales_coa', "placeholder" => 'account::product.placeholder.sales_coa', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'account/product/new', 'method' => 'GET', ], 'create' => [ 'url' => 'account/product/create', 'method' => 'GET', ], 'store' => [ 'url' => 'account/product', 'method' => 'POST', ], 'update' => [ 'url' => 'account/product', 'method' => 'PUT', ], 'list' => [ 'url' => 'account/product', 'method' => 'GET', ], 'delete' => [ 'url' => 'account/product', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'account::product.label.created_at', 'name' => 'account::product.label.name', 'status' => 'account::product.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "account::product.groups.main", 'group' => "main.main", 'title' => "account::product.groups.main", ], [ 'icon' => "fe:home", 'name' => "account::product.groups.details", 'group' => "main.details", 'title' => "account::product.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "account::product.groups.images", 'group' => "main.images", 'title' => "account::product.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "account::product.groups.settings", 'group' => "main.settings", 'title' => "account::product.groups.settings", ] ], 'controller' => [ 'provider' => 'Litecms', 'package' => 'Account', 'module' => 'Product', ], 'actions' => [ 'copy' => [ 'type' => ['Details', 'List'], 'label' => 'account::product.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['account.product.copy', 'account.product.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'account::product.label.count', "placeholder" => 'account::product.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" => 'account::product.label.comment', "placeholder" => 'account::product.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'account::product.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'account::product.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];