Skip to content

Commit 7c59ce6

Browse files
author
Brian Dillingham
committed
wip
1 parent 7008ed8 commit 7c59ce6

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

readme.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff 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
7077
BelongsTo::make('Project'),
78+
7179
AjaxSelect::make('File')
7280
->get('/{project}/files')
7381
->parent('project'),
82+
7483
AjaxSelect::make('Comment')
7584
->get('/{project}/comments')
7685
->parent('project'),

0 commit comments

Comments
 (0)