I am working on an exception right now in laravel giving a weird behavior that I have not seen before and can't seem to find much information about. I am getting this error message Undefined property: App\Exceptions\UserNotApproved::$headers. Not sure whats going.
<?php
namespace App\Exceptions;
use Exception;
class UserNotApproved extends Exception
{
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}
/**
* Render the exception into an HTTP response.
*
* @param \Illuminate\Http\Request
* @return \Illuminate\Http\Response
*/
public function render($request)
{
return response()->view('errors.not_approved',['exception'=>$this],403);
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire