I have a project developed with the roles and permissions package caffeinated/shinobi/
.
now to optimize its loading I added the package to detect the n + 1 error in queries and I realized that for every @can
directive it executed a query.
so for each load it executes 120 queries since I have 120 @can
verifications in my blade view, it is a horror, does anyone know how to fix it?
does anyone know how to solve it (didn't know what portion of code to add)?
view
@can('slug-permission')
@endcan