💟HasOne

you can use HasOne::class
to build a select input like this
HasOne::make('name');
this class works with vue ViltHasOne.vue
it has some more methods for setting options
->options(array) //you can use Options::class to add new options or array ["name"=>"", "id"=>""]
->trackByName(string)
->trackById(string)
->relation(string)
->model(Model::class)
Use Quick CRUD
you can use
->add()
->rows([
Text::make('name')
])
to make a simple CRUD with a button after the input and when you add a new one it will be appended to the select input.
Custom Query
to custom the query when you call the API you can use this method
->query('customer_id', '=', 1)
Last updated