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