You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relation fields are representing Eloquent relation definitions on the resource models. Relation fields are highly customizable and provide a nice and detailed API.
524
524
525
+
### Configuration
526
+
527
+
### Searchable & Sortable Columns
528
+
529
+
#### Customizing the Query
530
+
531
+
You may customize the relatable model's query. This is possible defining global scopes per field type or locally on the field definition.
532
+
533
+
You may apply global customization using the `scopeQuery` static method:
534
+
535
+
```php
536
+
use Illuminate\Database\Eloquent\Builder;
537
+
use Illuminate\Database\Eloquent\Model;
538
+
use Illuminate\Http\Request;
539
+
540
+
Media::scopeQuery(function (Request $request, Builder $query, Model $model): Builder {
0 commit comments