main
Last change
on this file since cf84baa was c454c0f, checked in by bube-ristovska <ristovska725@…>, 11 months ago |
First commit
|
-
Property mode
set to
100644
|
File size:
409 bytes
|
Rev | Line | |
---|
[c454c0f] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | namespace App\Http\Middleware;
|
---|
| 4 |
|
---|
| 5 | use Illuminate\Auth\Middleware\Authenticate as Middleware;
|
---|
| 6 | use Illuminate\Http\Request;
|
---|
| 7 |
|
---|
| 8 | class Authenticate extends Middleware
|
---|
| 9 | {
|
---|
| 10 | /**
|
---|
| 11 | * Get the path the user should be redirected to when they are not authenticated.
|
---|
| 12 | */
|
---|
| 13 | protected function redirectTo(Request $request): ?string
|
---|
| 14 | {
|
---|
| 15 | return $request->expectsJson() ? null : route('login');
|
---|
| 16 | }
|
---|
| 17 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.