test select akax field

This commit is contained in:
ilmedova 2022-11-23 02:09:21 +05:00
parent 4384a04aa2
commit ccc288135b
1 changed files with 21 additions and 21 deletions

View File

@ -105,28 +105,28 @@ protected function setupCreateOperation()
'type' => 'textarea',
'label' => trans('app.ticket.content')
],
[ // SelectMultiple = n-n relationship (with pivot table)
'label' => trans('app.ticket.account'),
'type' => 'custom_select_account',
'name' => 'client_id', // the method that defines the relationship in your Model
'entity' => 'account', // the method that defines the relationship in your Model
'model' => "App\Models\Account", // foreign key model
'attribute_1' => 'name', // foreign key attribute that is shown to user
'attribute_2' => 'surname',
],
// [ //NOT WORKING
// 'label' => trans('app.ticket.account'), // Table column heading
// 'type' => "select2_from_ajax",
// 'name' => 'client_id', // the column that contains the ID of that connected entity
// 'entity' => 'account', // the method that defines the relationship in your Model
// 'attribute' => "name", // foreign key attribute that is shown to user
// 'data_source' => backpack_url('account/fetch'),
// 'placeholder' => "Select a client", // placeholder for the select
// 'minimum_input_length' => 2, // minimum characters to type before querying results
// 'model' => "App\Models\Account", // foreign key model
// 'method' => 'POST', // optional - HTTP method to use for the AJAX call (GET, POST)
// [ // SelectMultiple = n-n relationship (with pivot table)
// 'label' => trans('app.ticket.account'),
// 'type' => 'custom_select_account',
// 'name' => 'client_id', // the method that defines the relationship in your Model
// 'entity' => 'account', // the method that defines the relationship in your Model
// 'model' => "App\Models\Account", // foreign key model
// 'attribute_1' => 'name', // foreign key attribute that is shown to user
// 'attribute_2' => 'surname',
// ],
[ //NOT WORKING
'label' => trans('app.ticket.account'), // Table column heading
'type' => "select2_from_ajax",
'name' => 'client_id', // the column that contains the ID of that connected entity
'entity' => 'account', // the method that defines the relationship in your Model
'attribute' => "name", // foreign key attribute that is shown to user
'data_source' => backpack_url('account/fetch'),
'placeholder' => "Select a client", // placeholder for the select
'minimum_input_length' => 2, // minimum characters to type before querying results
'model' => "App\Models\Account", // foreign key model
'method' => 'POST', // optional - HTTP method to use for the AJAX call (GET, POST)
],
[
'name' => 'category_id',
'entity' => 'category',