[ 'model' => \Litecms\Account\Models\InvoiceItems::class, 'table' => 'litecms_account_invoice_items', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['ref', 'user_id', 'itemable_id', 'itemable_type', 'type_id', 'item_type', 'description', 'debit', 'credit'], 'translatables' => [], 'upload_folder' => 'account/invoice_items', '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" => "ref", "type" => "text", "label" => 'account::invoice_items.label.ref', 'sort' => true, 'roles' => [], ], [ "key" => "itemable_id", "type" => "text", "label" => 'account::invoice_items.label.itemable_id', 'sort' => true, 'roles' => [], ], [ "key" => "itemable_type", "type" => "text", "label" => 'account::invoice_items.label.itemable_type', 'sort' => true, 'roles' => [], ], [ "key" => "type_id", "type" => "text", "label" => 'account::invoice_items.label.type_id', 'sort' => true, 'roles' => [], ], [ "key" => "item_type", "type" => "text", "label" => 'account::invoice_items.label.item_type', 'sort' => true, 'roles' => [], ], [ "key" => "description", "type" => "text", "label" => 'account::invoice_items.label.description', 'sort' => true, 'roles' => [], ], [ "key" => "debit", "type" => "text", "label" => 'account::invoice_items.label.debit', 'sort' => true, 'roles' => [], ], [ "key" => "credit", "type" => "text", "label" => 'account::invoice_items.label.credit', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'ref', "element" => 'text', "type" => 'text', "label" => 'account::invoice_items.label.ref', "placeholder" => 'account::invoice_items.placeholder.ref', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'itemable_id', "element" => 'numeric', "type" => 'numeric', "label" => 'account::invoice_items.label.itemable_id', "placeholder" => 'account::invoice_items.placeholder.itemable_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'itemable_type', "element" => 'text', "type" => 'text', "label" => 'account::invoice_items.label.itemable_type', "placeholder" => 'account::invoice_items.placeholder.itemable_type', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'type_id', "element" => 'numeric', "type" => 'numeric', "label" => 'account::invoice_items.label.type_id', "placeholder" => 'account::invoice_items.placeholder.type_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'item_type', "element" => 'radios', "type" => 'radios', "label" => 'account::invoice_items.label.item_type', "placeholder" => 'account::invoice_items.placeholder.item_type', "rules" => '', "options" => function(){ return trans('account::invoice_items.options.item_type'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'description', "element" => 'text', "type" => 'text', "label" => 'account::invoice_items.label.description', "placeholder" => 'account::invoice_items.placeholder.description', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'debit', "element" => 'decimal', "type" => 'decimal', "label" => 'account::invoice_items.label.debit', "placeholder" => 'account::invoice_items.placeholder.debit', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'credit', "element" => 'decimal', "type" => 'decimal', "label" => 'account::invoice_items.label.credit', "placeholder" => 'account::invoice_items.placeholder.credit', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'account/invoice_items/new', 'method' => 'GET', ], 'create' => [ 'url' => 'account/invoice_items/create', 'method' => 'GET', ], 'store' => [ 'url' => 'account/invoice_items', 'method' => 'POST', ], 'update' => [ 'url' => 'account/invoice_items', 'method' => 'PUT', ], 'list' => [ 'url' => 'account/invoice_items', 'method' => 'GET', ], 'delete' => [ 'url' => 'account/invoice_items', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'account::invoice_items.label.created_at', 'name' => 'account::invoice_items.label.name', 'status' => 'account::invoice_items.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "account::invoice_items.groups.main", 'group' => "main.main", 'title' => "account::invoice_items.groups.main", ], [ 'icon' => "fe:home", 'name' => "account::invoice_items.groups.details", 'group' => "main.details", 'title' => "account::invoice_items.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "account::invoice_items.groups.images", 'group' => "main.images", 'title' => "account::invoice_items.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "account::invoice_items.groups.settings", 'group' => "main.settings", 'title' => "account::invoice_items.groups.settings", ] ], 'controller' => [ 'provider' => 'Litecms', 'package' => 'Account', 'module' => 'InvoiceItems', ], 'actions' => [ 'copy' => [ 'type' => ['Details', 'List'], 'label' => 'account::invoice_items.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['account.invoice_items.copy', 'account.invoice_items.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'account::invoice_items.label.count', "placeholder" => 'account::invoice_items.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::invoice_items.label.comment', "placeholder" => 'account::invoice_items.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'account::invoice_items.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'account::invoice_items.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];