Table Search search over a field who doesn't exist now, but exists before.

This model had the field display, but it was moved to other model, now the search is searching over this field.
9 Replies
Patrick Boivin
Did you update the column in your resource table?
sergiogmr
sergiogmrOP2y ago
the column doesn't exist in the $table->columns
sergiogmr
sergiogmrOP2y ago
maybe something "cached" in somewhere?
Patrick Boivin
Strange... yeah, I'm not sure. Can you try php artisan optimize:clear
sergiogmr
sergiogmrOP2y ago
I did it too many times pataleaAsad
Patrick Boivin
Is this a table search or a global search?
sergiogmr
sergiogmrOP2y ago
table search, the search over the table next to filters Hello?
Lara Zeus
Lara Zeus2y ago
from your code the display still exist in the relations
TextColumn::make('brand.display')
TextColumn::make('type.display')
TextColumn::make('mountingtype.display')
TextColumn::make('brand.display')
TextColumn::make('type.display')
TextColumn::make('mountingtype.display')
and they all searchable!!! maybe remove them or set the searchable columns! ->searchable('someOtherColumn')

Did you find this page helpful?