PHP Classes

File: server/app/Http/Middleware/Authenticate.php

Recommend this page to a friend!
  Classes of mohammad anzawi   PHP Wallet API and Application   server/app/Http/Middleware/Authenticate.php   Download  
File: server/app/Http/Middleware/Authenticate.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Wallet API and Application
Application to manage a wallet by calling an API
Author: By
Last change:
Date: 2 years ago
Size: 469 bytes
 

Contents

Class file image Download
<?php

namespace App\Http\Middleware;

use
Illuminate\Auth\Middleware\Authenticate as Middleware;

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|null
     */
   
protected function redirectTo($request)
    {
        if (!
$request->expectsJson()) {
            return
route('login');
        }
    }
}