Files
InvoiceShelf/app/Http/Middleware/Authenticate.php
Darko Gjorgjijoski 6b80b5f48d Change namespace
2024-01-27 23:53:20 +01:00

22 lines
473 B
PHP

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