Answer the question
In order to leave comments, you need to log in
How to compactly write gates in Laravel?
I use gates to check permissions. If you define each resolution in this way, you get a big function. How to avoid it?
public function boot()
{
$this->registerPolicies();
Gate::define('users_info', function ($admin) {
if (! $admin->hasPermission('users_info') ) {
throw new AccessDenyException(ErrorMessages::ACCESS_DENIED, Response::HTTP_FORBIDDEN);
};
return true;
});
}
Answer the question
In order to leave comments, you need to log in
You can use js
. You have 4 columns, each of which looks like this:
<div class="overflow" style="overflow:hidden; height:800px;">
<div class="scroll" style="height:100%;">
<div class="item"></div>
</div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question