Reputation: 321
in laravel nova there is a filed you can override on any resource
public static $globallySearchable = false;
to disable searching for that resource, i want to disable actions in global search of nova a screenshot action results
i already disabled all resources in global search but still it returns some actions from where those actions are coming ? and how can i get rid of them ?
i already have looked for any available methods to override in novaServiceProvider but didn't get any result.
Upvotes: 2
Views: 2330
Reputation: 753
You will lose your changes after nova update if you use the provided solution.
Please check better one at
https://github.com/laravel/nova-issues/issues/2635#issuecomment-642219333
Upvotes: 0
Reputation: 321
It looks like Nova had a small not issue bug, they include a resource to brings action logs from the database. This file it's located on the Nova source folder in ./nova/src/Actions/ActionResource.php. To avoid this behavior, just add this line to the class:
class ActionResource extends Resource
{
//This is the line to add
public static $globallySearchable = false;
This going to stop showing the resource results on the Global Search.
I got the answer from here
Upvotes: 4