[ 'model' => \Litecms\Company\Models\Company::class, 'table' => 'litecms_company_companies', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['ref', 'parent_id', 'name', 'type', 'description', 'manager_id', 'lead_pool_open', 'call_target', 'listing_target', 'lead_target', 'viewing_target', 'offer_target', 'deal_target', 'customercare_mobile', 'customercare_email', 'user_type', 'user_id'], 'translatables' => [], 'upload_folder' => 'company/company', '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" => "ref", "type" => "text", "label" => 'company::company.label.ref', 'sort' => true, 'roles' => [], ], [ "key" => "parent_id", "type" => "text", "label" => 'company::company.label.parent_id', 'sort' => true, 'roles' => [], ], [ "key" => "name", "type" => "text", "label" => 'company::company.label.name', 'sort' => true, 'roles' => [], ], [ "key" => "type", "type" => "text", "label" => 'company::company.label.type', 'sort' => true, 'roles' => [], ], [ "key" => "description", "type" => "text", "label" => 'company::company.label.description', 'sort' => true, 'roles' => [], ], [ "key" => "manager_id", "type" => "text", "label" => 'company::company.label.manager_id', 'sort' => true, 'roles' => [], ], [ "key" => "lead_pool_open", "type" => "text", "label" => 'company::company.label.lead_pool_open', 'sort' => true, 'roles' => [], ], [ "key" => "call_target", "type" => "text", "label" => 'company::company.label.call_target', 'sort' => true, 'roles' => [], ], [ "key" => "listing_target", "type" => "text", "label" => 'company::company.label.listing_target', 'sort' => true, 'roles' => [], ], [ "key" => "lead_target", "type" => "text", "label" => 'company::company.label.lead_target', 'sort' => true, 'roles' => [], ], [ "key" => "viewing_target", "type" => "text", "label" => 'company::company.label.viewing_target', 'sort' => true, 'roles' => [], ], [ "key" => "offer_target", "type" => "text", "label" => 'company::company.label.offer_target', 'sort' => true, 'roles' => [], ], [ "key" => "deal_target", "type" => "text", "label" => 'company::company.label.deal_target', 'sort' => true, 'roles' => [], ], [ "key" => "customercare_mobile", "type" => "text", "label" => 'company::company.label.customercare_mobile', 'sort' => true, 'roles' => [], ], [ "key" => "customercare_email", "type" => "text", "label" => 'company::company.label.customercare_email', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'ref', "element" => 'text', "type" => 'text', "label" => 'company::company.label.ref', "placeholder" => 'company::company.placeholder.ref', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'parent_id', "element" => 'numeric', "type" => 'numeric', "label" => 'company::company.label.parent_id', "placeholder" => 'company::company.placeholder.parent_id', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'name', "element" => 'text', "type" => 'text', "label" => 'company::company.label.name', "placeholder" => 'company::company.placeholder.name', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'type', "element" => 'select', "type" => 'select', "label" => 'company::company.label.type', "placeholder" => 'company::company.placeholder.type', "rules" => '', "options" => function(){ return trans('company::company.options.type'); }, "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'description', "element" => 'text', "type" => 'text', "label" => 'company::company.label.description', "placeholder" => 'company::company.placeholder.description', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'manager_id', "element" => 'numeric', "type" => 'numeric', "label" => 'company::company.label.manager_id', "placeholder" => 'company::company.placeholder.manager_id', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'lead_pool_open', "element" => 'numeric', "type" => 'numeric', "label" => 'company::company.label.lead_pool_open', "placeholder" => 'company::company.placeholder.lead_pool_open', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'call_target', "element" => 'numeric', "type" => 'numeric', "label" => 'company::company.label.call_target', "placeholder" => 'company::company.placeholder.call_target', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'listing_target', "element" => 'numeric', "type" => 'numeric', "label" => 'company::company.label.listing_target', "placeholder" => 'company::company.placeholder.listing_target', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'lead_target', "element" => 'numeric', "type" => 'numeric', "label" => 'company::company.label.lead_target', "placeholder" => 'company::company.placeholder.lead_target', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'viewing_target', "element" => 'numeric', "type" => 'numeric', "label" => 'company::company.label.viewing_target', "placeholder" => 'company::company.placeholder.viewing_target', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'offer_target', "element" => 'numeric', "type" => 'numeric', "label" => 'company::company.label.offer_target', "placeholder" => 'company::company.placeholder.offer_target', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'deal_target', "element" => 'numeric', "type" => 'numeric', "label" => 'company::company.label.deal_target', "placeholder" => 'company::company.placeholder.deal_target', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'customercare_mobile', "element" => 'text', "type" => 'text', "label" => 'company::company.label.customercare_mobile', "placeholder" => 'company::company.placeholder.customercare_mobile', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'customercare_email', "element" => 'text', "type" => 'text', "label" => 'company::company.label.customercare_email', "placeholder" => 'company::company.placeholder.customercare_email', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'company/company/new', 'method' => 'GET', ], 'create' => [ 'url' => 'company/company/create', 'method' => 'GET', ], 'store' => [ 'url' => 'company/company', 'method' => 'POST', ], 'update' => [ 'url' => 'company/company', 'method' => 'PUT', ], 'list' => [ 'url' => 'company/company', 'method' => 'GET', ], 'delete' => [ 'url' => 'company/company', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'company::company.label.created_at', 'name' => 'company::company.label.name', 'status' => 'company::company.label.status', ], 'groups' => [ 'main' => [ 'icon' => "mdi:account-supervisor-outline", 'name' => "company::company.groups.main", 'key' => "main", 'title' => "company::company.groups.main", ], 'details' => [ 'icon' => "fe:home", 'name' => "company::company.groups.details", 'key' => "documents", 'title' => "company::company.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "company::company.groups.images", 'key' => "documents", 'title' => "company::company.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "company::company.groups.settings", 'key' => "documents", 'title' => "company::company.groups.settings", ] ], 'controller' => [ 'provider' => 'Litecms', 'package' => 'Company', 'module' => 'Company', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Litecms\Company\Models\Company::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' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'company::company.label.count', "placeholder" => 'company::company.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" => 'company::company.label.comment', "placeholder" => 'company::company.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' => 'company::company.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['company.company.copy', 'company.company.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'company::company.label.count', "placeholder" => 'company::company.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" => 'company::company.label.comment', "placeholder" => 'company::company.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'company::company.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], ] ];