Hey,
I got an error every using select on filter, the error as bellow:
Encore\Admin\Grid::__toString() must not throw an exception, caught Error: Call to a member function select() on null
I have already tried #807 but still got the error
protected function grid()
{
return Admin::grid(Devices::class, function (Grid $grid) {
$grid->name()->sortable();
$grid->filter(function($filter){
$filter->useModal();
$filter->disableIdFilter();
$filter->is('building_id')->select(Building::all()->pluck('building', 'id'));
$filter->like('name');
});
});
}
laravel framework version: 5.5.3
laravel-admin version: 1.5.3
In 1.5, $filter->is() renamed to $filter->equal(),and $filter->useModal(); has been removed.
Thank you sir, I think I read a wrong version of documentation. cheers..
Most helpful comment
In 1.5,
$filter->is()renamed to$filter->equal(),and$filter->useModal();has been removed.