Allowed Fields
// App\Models\User
public function posts(): Illuminate\Database\Eloquent\Relations\HasMany // This is mandatory
{
return $this->hasMany(Post::class);
}// App\Models\User
protected $filterFields = [
'email',
'mobile',
'posts', // relation
];
protected $sortFields = [
'name',
'mobile',
];Overwrite Allowed Fields
Last updated