I have a large number of views in my app and now I have implemented a class that I will use in most of the views through the app.
Is there a way to add a global namespace to be available in all views?
I’m having to add
use App\Helpers\PermissionHelper; in views, I want to use class
PermissionHelper. I would like to add it globally so I could use that class without adding the namespace in all cases.
I used to work with ASP.Net MVC and it has a section in its web.config(a global setup for the whole project) where you can add namespaces to be automatically available in files(like views), like this.