Searchable column with scoped model
I've got a table on a custom page which uses a model with a scope for its query.
This is the scope:
The table uses this scope as the query and a searchable name column. Because of the scope I use a callback function to add the search condition to the query:
Unfortunately the search doesn't apply to the data. The table shows that a filter is active with the search string, but still all data is shown. Any idea what I'm doing wrong?
1 Reply
if I dump the $query->toRawSql() in the searchable callback function, I get
but if I dump $table->getQuery()->toRawSql() I get
That's weird, why doesn't match the $query in the callback function the query of the table?
Has anyone an idea?