Пример #1
0
 public function authorize(Authentication $auth)
 {
     $userId = $this->route('id');
     return $auth->check()->id == $userId || $auth->inRole('admin');
 }