usersuser
usersuser

Reputation: 167

How to add another table column in searchable array in nova?

i am getting data from different different tables and i displayed all those in one section that section contains search button also, i want to add another resource field as a searchable item in nova ,i am trying to add based on the relation of the particular table but it's throwing an error undefined column, How to add please help..

public static $searchable=['id','name','account.type'];

Upvotes: 1

Views: 1173

Answers (1)

Luca P.
Luca P.

Reputation: 159

Basically, the search by relationship is not possible through Nova.


A package well made for your needs is this one: LaravelNovaSearch

This package includes both relationship search but also has other useful features making the search much more comprehensive.


Another package, which I have not personally tested, but which seems to be useful for your needs: NovaSearchRelations


My advice is to use LaravelNovaSearch, more maintained and more complete.

Upvotes: 1

Related Questions