TitasGailius / nova-search-relations

This package allow you to include relationship columns into Laravel Nova search query.
Other
352 stars 33 forks source link

Global search broken #8

Closed desaintflorent closed 5 years ago

desaintflorent commented 5 years ago

Recently the search functionality broke on my nova app. It seems that I need to declare $searchRelations for any model I have set in nova. If not, the global search ( or any search in a nova field ) display the error : "Access to undeclared static property: App\Nova\City::$searchRelations"

I'm using laravel 5.6.39 and Nova 1.2.1

desaintflorent commented 5 years ago

As a fix I currently do : public static $searchRelations = []; For any model in nova

TitasGailius commented 5 years ago

Tested it with Nova 1.2.1 and Laravel 5.6, everything works as expected.

Can you provide stacktrace or some more details on how to reproduce it?

TitasGailius commented 5 years ago

also which php version are you using?