Issues (404)

Branch: dev

app/Http/Middleware/Authenticate.php (1 issue)

Labels
Severity
1
<?php
2
namespace App\Http\Middleware;
3
4
use Illuminate\Auth\Middleware\Authenticate as Middleware;
5
use Facades\App\Services\WhichPortal;
6
7
class Authenticate extends Middleware
8
{
9
    /**
10
     * Get the path the user should be redirected to when they are not authenticated.
11
     *
12
     * @param  \Illuminate\Http\Request  $request
13
     * @return string
14 1
     */
15
    protected function redirectTo($request)
16 1
    {
17
        if (WhichPortal::isManagerPortal()) {
18
            return route('manager.login');
0 ignored issues
show
The function route was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
            return /** @scrutinizer ignore-call */ route('manager.login');
Loading history...
19 1
        } elseif (WhichPortal::isHrPortal()) {
20
            return route('hr_advisor.login');
21
        } else {
22
            return route('login');
23
        }
24
    }
25
}
26