resolution crud controllers ready with localizaion
This commit is contained in:
parent
9f1b6bbaf5
commit
0c62a46c7d
|
|
@ -25,7 +25,7 @@ public function setup()
|
|||
{
|
||||
CRUD::setModel(\App\Models\Department::class);
|
||||
CRUD::setRoute(config('backpack.base.route_prefix') . '/department');
|
||||
CRUD::setEntityNameStrings('department', 'departments');
|
||||
CRUD::setEntityNameStrings(trans('app.resolution.department'), trans('app.resolution.departments'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -36,8 +36,12 @@ public function setup()
|
|||
*/
|
||||
protected function setupListOperation()
|
||||
{
|
||||
CRUD::column('id');
|
||||
CRUD::column('title');
|
||||
//CRUD::column('id');
|
||||
CRUD::addColumn([
|
||||
'name' => 'title',
|
||||
'type' => 'text',
|
||||
'label' => trans('app.account.name')
|
||||
]);
|
||||
|
||||
/**
|
||||
* Columns can be defined using the fluent syntax or array syntax:
|
||||
|
|
@ -56,7 +60,11 @@ protected function setupCreateOperation()
|
|||
{
|
||||
CRUD::setValidation(DepartmentRequest::class);
|
||||
|
||||
CRUD::field('title');
|
||||
CRUD::addField([
|
||||
'name' => 'title',
|
||||
'type' => 'text',
|
||||
'label' => trans('app.account.name')
|
||||
]);
|
||||
|
||||
/**
|
||||
* Fields can be defined using the fluent syntax or array syntax:
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public function setup()
|
|||
{
|
||||
CRUD::setModel(\App\Models\Resolution::class);
|
||||
CRUD::setRoute(config('backpack.base.route_prefix') . '/resolution');
|
||||
CRUD::setEntityNameStrings('resolution', 'resolutions');
|
||||
CRUD::setEntityNameStrings(trans('app.resolution.resolution'), trans('app.resolution.resolutions'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -36,8 +36,12 @@ public function setup()
|
|||
*/
|
||||
protected function setupListOperation()
|
||||
{
|
||||
CRUD::column('id');
|
||||
CRUD::column('title');
|
||||
//CRUD::column('id');
|
||||
CRUD::addColumn([
|
||||
'name' => 'title',
|
||||
'type' => 'text',
|
||||
'label' => trans('app.account.name')
|
||||
]);
|
||||
|
||||
/**
|
||||
* Columns can be defined using the fluent syntax or array syntax:
|
||||
|
|
@ -56,7 +60,11 @@ protected function setupCreateOperation()
|
|||
{
|
||||
CRUD::setValidation(ResolutionRequest::class);
|
||||
|
||||
CRUD::field('title');
|
||||
CRUD::addFields([
|
||||
'name' => 'title',
|
||||
'type' => 'text',
|
||||
'label' => trans('app.account.name')
|
||||
]);
|
||||
|
||||
/**
|
||||
* Fields can be defined using the fluent syntax or array syntax:
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public function setup()
|
|||
{
|
||||
CRUD::setModel(\App\Models\Resolutionbasis::class);
|
||||
CRUD::setRoute(config('backpack.base.route_prefix') . '/resolutionbasis');
|
||||
CRUD::setEntityNameStrings('resolutionbasis', 'resolutionbases');
|
||||
CRUD::setEntityNameStrings(trans('app.resolution.resolutionbasis'), trans('app.resolution.resolutionbases'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -42,12 +42,12 @@ protected function setupListOperation()
|
|||
[
|
||||
'name' => 'contract_id',
|
||||
'type' => 'text',
|
||||
'label' => 'Contract'
|
||||
'label' => trans('app.contract.title')
|
||||
],
|
||||
[
|
||||
'name' => 'department_id',
|
||||
'type' => 'select',
|
||||
'label' => 'Department',
|
||||
'label' => trans('app.resolution.department'),
|
||||
'entity' => 'department',
|
||||
'attribute' => 'title',
|
||||
'model' => 'App\Models\Department'
|
||||
|
|
@ -55,7 +55,7 @@ protected function setupListOperation()
|
|||
[
|
||||
'name' => 'resolution_id',
|
||||
'type' => 'select',
|
||||
'label' => 'Resolution',
|
||||
'label' => trans('app.resolution.resolution'),
|
||||
'entity' => 'resolution',
|
||||
'attribute' => 'title',
|
||||
'model' => 'App\Models\Resolution'
|
||||
|
|
@ -63,7 +63,7 @@ protected function setupListOperation()
|
|||
[
|
||||
'name' => 'resolutionbasis',
|
||||
'type' => 'text',
|
||||
'label' => 'resolution basis'
|
||||
'label' => trans('app.resolution.resolutionbasis')
|
||||
]
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -224,5 +224,13 @@
|
|||
'approved_date' => 'Approved date',
|
||||
'last_modified_by' => 'Last modified by',
|
||||
'last_modified_date' => 'Last modified date'
|
||||
],
|
||||
'resolution' => [
|
||||
'department' => 'department',
|
||||
'departments' => 'departments',
|
||||
'resolution' => 'resolution',
|
||||
'resolutions' => 'resolutions',
|
||||
'resolutionbasis' => 'resolutionbasis',
|
||||
'resolutionbases' => 'resolutionbases'
|
||||
]
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue