mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-24 23:35:30 +08:00
Forms/Docs: Add documentation for new ignoreRecord argument
This commit is contained in:
@@ -204,6 +204,19 @@ Select::make('author_id')
|
||||
->preload()
|
||||
```
|
||||
|
||||
### Excluding the current record
|
||||
|
||||
When working with recursive relationships, you will likely want to remove the current record from the set of results.
|
||||
|
||||
This can be easily be done using the `ignoreRecord` argument.
|
||||
|
||||
```php
|
||||
use Filament\Forms\Components\Select;
|
||||
|
||||
Select::make('parent_id')
|
||||
->relationship('parent', 'name', ignoreRecord: true)
|
||||
```
|
||||
|
||||
### Customizing the relationship query
|
||||
|
||||
You may customize the database query that retrieves options using the third parameter of the `relationship()` method:
|
||||
|
||||
Reference in New Issue
Block a user