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