search fix
This commit is contained in:
parent
eab9d493f2
commit
d35e58ac72
|
|
@ -77,12 +77,12 @@ class AccountCrudController extends CrudController
|
|||
[
|
||||
'name' => 'is_active',
|
||||
'label' => 'Is Active',
|
||||
'type' => 'boolean'
|
||||
'type' => 'check'
|
||||
],
|
||||
[
|
||||
'name' => 'is_banned',
|
||||
'label' => 'Is Banned',
|
||||
'type' => 'boolean'
|
||||
'type' => 'check'
|
||||
]
|
||||
]);
|
||||
$this->crud->setRequiredFields(StoreRequest::class, 'create');
|
||||
|
|
|
|||
|
|
@ -25,7 +25,60 @@ class OrganiserCrudController extends CrudController
|
|||
| CrudPanel Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
$this->crud->setFromDb();
|
||||
// $this->crud->setFromDb();
|
||||
$this->crud->setColumns([
|
||||
[
|
||||
'name' => 'account_id',
|
||||
'label' => 'Account',
|
||||
'type' => 'select',
|
||||
'entity'=> 'account',
|
||||
'attribute'=>'email'
|
||||
],
|
||||
[
|
||||
'name' => 'name',
|
||||
'label' => 'Name',
|
||||
'type' => 'text'
|
||||
],
|
||||
[
|
||||
'name' => 'about',
|
||||
'label' => 'About',
|
||||
'type' => 'text'
|
||||
],
|
||||
[
|
||||
'name' => 'email',
|
||||
'label' => trans('backpack::permissionmanager.email'),
|
||||
'type' => 'email',
|
||||
]
|
||||
]);
|
||||
$this->crud->addFields([
|
||||
[
|
||||
'name' => 'account_id',
|
||||
'label' => 'Account',
|
||||
'type' => 'select',
|
||||
'entity'=> 'account',
|
||||
'attribute'=>'email'
|
||||
],
|
||||
[
|
||||
'name' => 'name',
|
||||
'label' => 'Name',
|
||||
'type' => 'text'
|
||||
],
|
||||
[
|
||||
'name' => 'about',
|
||||
'label' => 'About',
|
||||
'type' => 'textarea'
|
||||
],
|
||||
[
|
||||
'name' => 'phone',
|
||||
'label' => 'Phone',
|
||||
'type' => 'text'
|
||||
],
|
||||
[
|
||||
'name' => 'email',
|
||||
'label' => trans('backpack::permissionmanager.email'),
|
||||
'type' => 'email',
|
||||
]
|
||||
]);
|
||||
$this->crud->setRequiredFields(StoreRequest::class, 'create');
|
||||
$this->crud->setRequiredFields(UpdateRequest::class, 'edit');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,13 @@ class UserCrudController extends CrudController
|
|||
'label' => trans('backpack::permissionmanager.email'),
|
||||
'type' => 'email',
|
||||
],
|
||||
[
|
||||
'name' => 'account_id',
|
||||
'label' => 'Account',
|
||||
'type' => 'select',
|
||||
'entity'=> 'account',
|
||||
'attribute'=>'email'
|
||||
]
|
||||
// [ // n-n relationship (with pivot table)
|
||||
// 'label' => trans('backpack::permissionmanager.roles'), // Table column heading
|
||||
// 'type' => 'select_multiple',
|
||||
|
|
|
|||
|
|
@ -52,6 +52,13 @@ class Organiser extends MyBaseModel implements AuthenticatableContract
|
|||
'organiser_logo.mimes' => 'Please select a valid image type (jpeg, jpg, png)',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'account_id',
|
||||
'email',
|
||||
'phone',
|
||||
'name'
|
||||
];
|
||||
|
||||
/**
|
||||
* The account associated with the organiser
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue