Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 protected function failedAuthorization()
 {
     if (is_api_request()) {
         return app(Response::class)->unauthorizedError();
     }
     return parent::failedAuthorization();
 }
Exemplo n.º 2
0
 /**
  * Handle a failed authorization attempt.
  *
  * @return void
  */
 protected function failedAuthorization()
 {
     if ($this->container['request'] instanceof Request) {
         throw new HttpException(403);
     }
     parent::failedAuthorization();
 }
Exemplo n.º 3
0
 protected function failedAuthorization()
 {
     parent::failedAuthorization();
 }