页面
@can('Article_Edit',$val)
@endcan
AuthServiceProvider.php
foreach($this->getPermissions() as $permissions){
$gate->define($permissions->name,function($user,$article) use ($permissions){
return $user->hasRole($permissions->roles) && $user->owns($article);
});
}