Argument 2 passed to App\Exceptions\Handler::unauthenticated() must be an instance of App\Exceptions\AuthenticationException, instance of Illuminate\Auth\AuthenticationException given
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest('/');
}
namespace App\Exceptions;
use Exception;
use Request;
use Illuminate\Auth\AuthenticationException;
use Response;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
Also in PHP:
- console in php
- base64 to string pp
- disable login and register in laravel
- cashe command laravel
- Which of the following Laravel frameworks can be used to manage the dependencies of a PHP software?
- crrate model in laravel
- arr::plunk laravel
- $date php
- 'PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 282624 bytes)
- CODEIGNITER codeigniter 4 auth
- check is front page wordpress
- do you need to clear cache laravel
- clear command in laravel
- array unique in php using a column
- base64decode php
- $this in catch block php
- $pdo= new PDO(
- date formate php
- check if string is in string php
- configure php 7.4 on ubuntu
- CURL : Get elements by class name
- difference between two timestamps php
- char to uppercase php
- array merge in php