[ 'model' => \Litecms\Parser\Models\Whatsapp::class, 'table' => 'litecms_parser_whatsapps', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['lead_id', 'ref_no', 'name', 'message', 'multimedia', 'url', 'mobile', 'mobile_org', 'details', 'source', 'converted', 'notes', 'status'], 'translatables' => [], 'upload_folder' => 'parser/whatsapp', '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" => "lead_id", "type" => "text", "label" => 'parser::whatsapp.label.lead_id', 'sort' => true, 'roles' => [], ], [ "key" => "ref_no", "type" => "text", "label" => 'parser::whatsapp.label.ref_no', 'sort' => true, 'roles' => [], ], [ "key" => "name", "type" => "text", "label" => 'parser::whatsapp.label.name', 'sort' => true, 'roles' => [], ], [ "key" => "message", "type" => "text", "label" => 'parser::whatsapp.label.message', 'sort' => true, 'roles' => [], ], [ "key" => "multimedia", "type" => "text", "label" => 'parser::whatsapp.label.multimedia', 'sort' => true, 'roles' => [], ], [ "key" => "url", "type" => "text", "label" => 'parser::whatsapp.label.url', 'sort' => true, 'roles' => [], ], [ "key" => "mobile", "type" => "text", "label" => 'parser::whatsapp.label.mobile', 'sort' => true, 'roles' => [], ], [ "key" => "mobile_org", "type" => "text", "label" => 'parser::whatsapp.label.mobile_org', 'sort' => true, 'roles' => [], ], [ "key" => "details", "type" => "text", "label" => 'parser::whatsapp.label.details', 'sort' => true, 'roles' => [], ], [ "key" => "source", "type" => "text", "label" => 'parser::whatsapp.label.source', 'sort' => true, 'roles' => [], ], [ "key" => "converted", "type" => "text", "label" => 'parser::whatsapp.label.converted', 'sort' => true, 'roles' => [], ], [ "key" => "notes", "type" => "text", "label" => 'parser::whatsapp.label.notes', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'lead_id', "element" => 'numeric', "type" => 'numeric', "label" => 'parser::whatsapp.label.lead_id', "placeholder" => 'parser::whatsapp.placeholder.lead_id', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'ref_no', "element" => 'text', "type" => 'text', "label" => 'parser::whatsapp.label.ref_no', "placeholder" => 'parser::whatsapp.placeholder.ref_no', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'name', "element" => 'text', "type" => 'text', "label" => 'parser::whatsapp.label.name', "placeholder" => 'parser::whatsapp.placeholder.name', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'message', "element" => 'text', "type" => 'text', "label" => 'parser::whatsapp.label.message', "placeholder" => 'parser::whatsapp.placeholder.message', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'multimedia', "element" => 'text', "type" => 'text', "label" => 'parser::whatsapp.label.multimedia', "placeholder" => 'parser::whatsapp.placeholder.multimedia', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'url', "element" => 'text', "type" => 'text', "label" => 'parser::whatsapp.label.url', "placeholder" => 'parser::whatsapp.placeholder.url', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'mobile', "element" => 'text', "type" => 'text', "label" => 'parser::whatsapp.label.mobile', "placeholder" => 'parser::whatsapp.placeholder.mobile', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'mobile_org', "element" => 'text', "type" => 'text', "label" => 'parser::whatsapp.label.mobile_org', "placeholder" => 'parser::whatsapp.placeholder.mobile_org', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'details', "element" => 'text', "type" => 'text', "label" => 'parser::whatsapp.label.details', "placeholder" => 'parser::whatsapp.placeholder.details', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'source', "element" => 'text', "type" => 'text', "label" => 'parser::whatsapp.label.source', "placeholder" => 'parser::whatsapp.placeholder.source', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'converted', "element" => 'radios', "type" => 'radios', "label" => 'parser::whatsapp.label.converted', "placeholder" => 'parser::whatsapp.placeholder.converted', "rules" => '', "options" => function(){ return trans('parser::whatsapp.options.converted'); }, "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'notes', "element" => 'text', "type" => 'text', "label" => 'parser::whatsapp.label.notes', "placeholder" => 'parser::whatsapp.placeholder.notes', "rules" => '', "group" => "main", "section" => "first", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'parser/whatsapp/new', 'method' => 'GET', ], 'create' => [ 'url' => 'parser/whatsapp/create', 'method' => 'GET', ], 'store' => [ 'url' => 'parser/whatsapp', 'method' => 'POST', ], 'update' => [ 'url' => 'parser/whatsapp', 'method' => 'PUT', ], 'list' => [ 'url' => 'parser/whatsapp', 'method' => 'GET', ], 'delete' => [ 'url' => 'parser/whatsapp', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'parser::whatsapp.label.created_at', 'name' => 'parser::whatsapp.label.name', 'status' => 'parser::whatsapp.label.status', ], 'groups' => [ 'main' => [ 'icon' => "mdi:account-supervisor-outline", 'name' => "parser::whatsapp.groups.main", 'key' => "main", 'title' => "parser::whatsapp.groups.main", ], 'details' => [ 'icon' => "fe:home", 'name' => "parser::whatsapp.groups.details", 'key' => "documents", 'title' => "parser::whatsapp.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "parser::whatsapp.groups.images", 'key' => "documents", 'title' => "parser::whatsapp.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "parser::whatsapp.groups.settings", 'key' => "documents", 'title' => "parser::whatsapp.groups.settings", ] ], 'controller' => [ 'provider' => 'Litecms', 'package' => 'Parser', 'module' => 'Whatsapp', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Litecms\Parser\Models\Whatsapp::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" => 'parser::whatsapp.label.count', "placeholder" => 'parser::whatsapp.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" => 'parser::whatsapp.label.comment', "placeholder" => 'parser::whatsapp.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' => 'parser::whatsapp.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['parser.whatsapp.copy', 'parser.whatsapp.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'parser::whatsapp.label.count', "placeholder" => 'parser::whatsapp.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" => 'parser::whatsapp.label.comment', "placeholder" => 'parser::whatsapp.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'parser::whatsapp.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], ] ];