[ 'model' => \Litecms\Building\Models\Building::class, 'table' => 'litecms_building_buildings', 'hidden'=> [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'created_at', 'updated_at'], 'appends' => [], 'fillable' => ['country_id', 'city_id', 'location_id', 'sublocation_id', 'property_id', 'ownership', 'plot_no', 'land_no', 'category', 'maintenance_fee', 'floors', 'plot_area', 'bua', 'contact_id', 'description', 'bank', 'notes', 'documents', 'features', 'amenities', 'features_intl', 'specifications', 'images'], 'translatables' => [], 'upload_folder' => 'building/building', '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" => "country_id", "type" => "text", "label" => 'building::building.label.country_id', 'sort' => true, 'roles' => [], ], [ "key" => "city_id", "type" => "text", "label" => 'building::building.label.city_id', 'sort' => true, 'roles' => [], ], [ "key" => "location_id", "type" => "text", "label" => 'building::building.label.location_id', 'sort' => true, 'roles' => [], ], [ "key" => "sublocation_id", "type" => "text", "label" => 'building::building.label.sublocation_id', 'sort' => true, 'roles' => [], ], [ "key" => "property_id", "type" => "text", "label" => 'building::building.label.property_id', 'sort' => true, 'roles' => [], ], [ "key" => "ownership", "type" => "text", "label" => 'building::building.label.ownership', 'sort' => true, 'roles' => [], ], [ "key" => "plot_no", "type" => "text", "label" => 'building::building.label.plot_no', 'sort' => true, 'roles' => [], ], [ "key" => "land_no", "type" => "text", "label" => 'building::building.label.land_no', 'sort' => true, 'roles' => [], ], [ "key" => "category", "type" => "text", "label" => 'building::building.label.category', 'sort' => true, 'roles' => [], ], [ "key" => "maintenance_fee", "type" => "text", "label" => 'building::building.label.maintenance_fee', 'sort' => true, 'roles' => [], ], [ "key" => "floors", "type" => "text", "label" => 'building::building.label.floors', 'sort' => true, 'roles' => [], ], [ "key" => "plot_area", "type" => "text", "label" => 'building::building.label.plot_area', 'sort' => true, 'roles' => [], ], [ "key" => "bua", "type" => "text", "label" => 'building::building.label.bua', 'sort' => true, 'roles' => [], ], [ "key" => "contact_id", "type" => "text", "label" => 'building::building.label.contact_id', 'sort' => true, 'roles' => [], ], [ "key" => "description", "type" => "text", "label" => 'building::building.label.description', 'sort' => true, 'roles' => [], ], [ "key" => "bank", "type" => "text", "label" => 'building::building.label.bank', 'sort' => true, 'roles' => [], ], [ "key" => "notes", "type" => "text", "label" => 'building::building.label.notes', 'sort' => true, 'roles' => [], ], [ "key" => "documents", "type" => "text", "label" => 'building::building.label.documents', 'sort' => true, 'roles' => [], ], [ "key" => "features", "type" => "text", "label" => 'building::building.label.features', 'sort' => true, 'roles' => [], ], [ "key" => "amenities", "type" => "text", "label" => 'building::building.label.amenities', 'sort' => true, 'roles' => [], ], [ "key" => "features_intl", "type" => "text", "label" => 'building::building.label.features_intl', 'sort' => true, 'roles' => [], ], [ "key" => "specifications", "type" => "text", "label" => 'building::building.label.specifications', 'sort' => true, 'roles' => [], ], [ "key" => "images", "type" => "text", "label" => 'building::building.label.images', 'sort' => true, 'roles' => [], ], ], 'form' => [ [ "key" => 'country_id', "element" => 'numeric', "type" => 'numeric', "label" => 'building::building.label.country_id', "placeholder" => 'building::building.placeholder.country_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'city_id', "element" => 'numeric', "type" => 'numeric', "label" => 'building::building.label.city_id', "placeholder" => 'building::building.placeholder.city_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'location_id', "element" => 'numeric', "type" => 'numeric', "label" => 'building::building.label.location_id', "placeholder" => 'building::building.placeholder.location_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'sublocation_id', "element" => 'numeric', "type" => 'numeric', "label" => 'building::building.label.sublocation_id', "placeholder" => 'building::building.placeholder.sublocation_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'property_id', "element" => 'numeric', "type" => 'numeric', "label" => 'building::building.label.property_id', "placeholder" => 'building::building.placeholder.property_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'ownership', "element" => 'radios', "type" => 'radios', "label" => 'building::building.label.ownership', "placeholder" => 'building::building.placeholder.ownership', "rules" => '', "options" => function(){ return trans('building::building.options.ownership'); }, "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'plot_no', "element" => 'text', "type" => 'text', "label" => 'building::building.label.plot_no', "placeholder" => 'building::building.placeholder.plot_no', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'land_no', "element" => 'text', "type" => 'text', "label" => 'building::building.label.land_no', "placeholder" => 'building::building.placeholder.land_no', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'category', "element" => 'text', "type" => 'text', "label" => 'building::building.label.category', "placeholder" => 'building::building.placeholder.category', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'maintenance_fee', "element" => 'decimal', "type" => 'decimal', "label" => 'building::building.label.maintenance_fee', "placeholder" => 'building::building.placeholder.maintenance_fee', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'floors', "element" => 'numeric', "type" => 'numeric', "label" => 'building::building.label.floors', "placeholder" => 'building::building.placeholder.floors', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'plot_area', "element" => 'numeric', "type" => 'numeric', "label" => 'building::building.label.plot_area', "placeholder" => 'building::building.placeholder.plot_area', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'bua', "element" => 'numeric', "type" => 'numeric', "label" => 'building::building.label.bua', "placeholder" => 'building::building.placeholder.bua', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'contact_id', "element" => 'numeric', "type" => 'numeric', "label" => 'building::building.label.contact_id', "placeholder" => 'building::building.placeholder.contact_id', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'description', "element" => 'text', "type" => 'text', "label" => 'building::building.label.description', "placeholder" => 'building::building.placeholder.description', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'bank', "element" => 'text', "type" => 'text', "label" => 'building::building.label.bank', "placeholder" => 'building::building.placeholder.bank', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'notes', "element" => 'text', "type" => 'text', "label" => 'building::building.label.notes', "placeholder" => 'building::building.placeholder.notes', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'documents', "element" => 'text', "type" => 'text', "label" => 'building::building.label.documents', "placeholder" => 'building::building.placeholder.documents', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'features', "element" => 'text', "type" => 'text', "label" => 'building::building.label.features', "placeholder" => 'building::building.placeholder.features', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'amenities', "element" => 'text', "type" => 'text', "label" => 'building::building.label.amenities', "placeholder" => 'building::building.placeholder.amenities', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'features_intl', "element" => 'text', "type" => 'text', "label" => 'building::building.label.features_intl', "placeholder" => 'building::building.placeholder.features_intl', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'specifications', "element" => 'text', "type" => 'text', "label" => 'building::building.label.specifications', "placeholder" => 'building::building.placeholder.specifications', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], [ "key" => 'images', "element" => 'text', "type" => 'text', "label" => 'building::building.label.images', "placeholder" => 'building::building.placeholder.images', "rules" => '', "group" => "main.main", "col" => "6", "append" => null, "prepend" => null, "roles" => [], "attributes" => [ 'wrapper' => [], "label" => [], "element" => [], ], ], ], 'urls' => [ 'new' => [ 'url' => 'building/building/new', 'method' => 'GET', ], 'create' => [ 'url' => 'building/building/create', 'method' => 'GET', ], 'store' => [ 'url' => 'building/building', 'method' => 'POST', ], 'update' => [ 'url' => 'building/building', 'method' => 'PUT', ], 'list' => [ 'url' => 'building/building', 'method' => 'GET', ], 'delete' => [ 'url' => 'building/building', 'method' => 'DELETE', ], ], 'order' => [ 'created_at' => 'building::building.label.created_at', 'name' => 'building::building.label.name', 'status' => 'building::building.label.status', ], 'groups' => [ [ 'icon' => "mdi:account-supervisor-outline", 'name' => "building::building.groups.main", 'group' => "main.main", 'title' => "building::building.groups.main", ], [ 'icon' => "fe:home", 'name' => "building::building.groups.details", 'group' => "main.details", 'title' => "building::building.groups.details", ], 'images' => [ 'icon' => "fe:home", 'name' => "building::building.groups.images", 'group' => "main.images", 'title' => "building::building.groups.images", ], 'settings' => [ 'icon' => "fe:home", 'name' => "building::building.groups.settings", 'group' => "main.settings", 'title' => "building::building.groups.settings", ] ], 'controller' => [ 'provider' => 'Litecms', 'package' => 'Building', 'module' => 'Building', ], 'workflow' => [ 'type' => 'workflow', 'marking_store' => [ 'type' => 'multiple_state', 'arguments' => ['status'], // 'property' => 'status' ], 'supports' => [ \Litecms\Building\Models\Building::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' => 'building::building.action.copy', 'roles' => [ 'user' => ['superuser', 'admin'], 'team' => ['admin'], 'permission' => ['building.building.copy', 'building.building.duplicate'], ], 'form' => [ 'count' => [ "element" => 'select', "type" => 'select', "label" => 'building::building.label.count', "placeholder" => 'building::building.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" => 'building::building.label.comment', "placeholder" => 'building::building.placeholder.comment', "col" => "12", ], ], ], 'empty' => [ 'type' => ['List', 'Details'], 'label' => 'building::building.action.empty', 'roles' => [ 'user' => ['superuser'], ], ], 'section' => [ 'type' => ['Group'], 'api_url' => '', 'action' => 'list', 'label' => 'building::building.action.section', 'store' => 'main.units', 'group' => 'main.units' ], ] ];