Open faruktunc opened 1 year ago
I am trying to do Cascading Select as given in the documentation. Data can be pulled correctly. However, this data does not come to select.
MalzemeControler.php
$form->select('depo_id', 'Depo Seçiniz')->options(Depo::all()->pluck('DepoAdi', 'id')) ->load('raf_id', '/api/raf'); $form->select('raf');
---api result and route---- /api/raf?q=1 result:
[ { "id": 1, "text": "A Rafı" }, { "id": 2, "text": "B Rafı" }, { "id": 3, "text": "C Rafı " } ]
in api.php -> Route::get('/raf',[RafApiController::class,'raf']);
And Here is the api controller function
public function raf(Request $request){ $depoId =$request->q; return (Raf::where('depo_id', $depoId)->get(['id', DB::raw('rafAdi as text')])); }
When I do it manually (via link) I can get results. When I select any option on the form, nothing changes. No data is coming
Description:
I am trying to do Cascading Select as given in the documentation. Data can be pulled correctly. However, this data does not come to select.
Steps To Reproduce:
MalzemeControler.php
---api result and route---- /api/raf?q=1 result:
in api.php -> Route::get('/raf',[RafApiController::class,'raf']);
And Here is the api controller function
When I do it manually (via link) I can get results. When I select any option on the form, nothing changes. No data is coming