File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -58,19 +58,28 @@ Route::get('api/company/{company}/users', function($company_id) {
5858` City ` makes a request based on ` State ` , which makes a request based on ` Country ` :
5959
6060``` php
61- Select::make('Country')->options([]),
62- AjaxSelect::make('State')->parent('country'),
63- AjaxSelect::make('City')->parent('state'),
61+ Select::make('Country')
62+ ->options([]),
63+
64+ AjaxSelect::make('State')
65+ ->get('/api/country/{country}/states')
66+ ->parent('country'),
67+
68+ AjaxSelect::make('City')
69+ ->get('/api/state/{state}/cities')
70+ ->parent('state'),
6471```
6572### Make multiple children depend on one parent
6673
6774` File ` & ` Comment ` will both make a request based on ` Project `
6875
6976``` php
7077BelongsTo::make('Project'),
78+
7179AjaxSelect::make('File')
7280 ->get('/{project}/files')
7381 ->parent('project'),
82+
7483AjaxSelect::make('Comment')
7584 ->get('/{project}/comments')
7685 ->parent('project'),
You can’t perform that action at this time.
0 commit comments