search fix

This commit is contained in:
merdan 2020-04-07 16:47:36 +05:00
parent 15803440a7
commit eab9d493f2
1 changed files with 55 additions and 1 deletions

View File

@ -30,7 +30,61 @@ class AccountCrudController extends CrudController
| CrudPanel Configuration
|--------------------------------------------------------------------------
*/
$this->crud->setFromDb();
// $this->crud->setFromDb();
$this->crud->setColumns([
[
'name' => 'first_name',
'label' => 'First Name',
'type' => 'text',
],
[
'name' => 'last_name',
'label' => 'Last Name',
'type' => 'text',
],
[
'name' => 'email',
'label' => trans('backpack::permissionmanager.email'),
'type' => 'email',
],
[
'name' => 'is_active',
'label' => 'Is Active',
'type' => 'boolean'
],
[
'name' => 'is_banned',
'label' => 'Is Banned',
'type' => 'boolean'
]
]);
$this->crud->addFields([
[
'name' => 'first_name',
'label' => 'First Name',
'type' => 'text',
],
[
'name' => 'last_name',
'label' => 'Last Name',
'type' => 'text',
],
[
'name' => 'email',
'label' => trans('backpack::permissionmanager.email'),
'type' => 'email',
],
[
'name' => 'is_active',
'label' => 'Is Active',
'type' => 'boolean'
],
[
'name' => 'is_banned',
'label' => 'Is Banned',
'type' => 'boolean'
]
]);
$this->crud->setRequiredFields(StoreRequest::class, 'create');
$this->crud->setRequiredFields(UpdateRequest::class, 'edit');
}