| 1 | <?php namespace App\Http\Middleware; |
||
| 7 | class RedirectIfAuthenticated { |
||
| 8 | |||
| 9 | /** |
||
| 10 | * The Guard implementation. |
||
| 11 | * |
||
| 12 | * @var Guard |
||
| 13 | */ |
||
| 14 | protected $auth; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Create a new filter instance. |
||
| 18 | * |
||
| 19 | * @param Guard $auth |
||
| 20 | * @return void |
||
|
|
|||
| 21 | */ |
||
| 22 | public function __construct(Guard $auth) |
||
| 23 | { |
||
| 24 | $this->auth = $auth; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Handle an incoming request. |
||
| 29 | * |
||
| 30 | * @param \Illuminate\Http\Request $request |
||
| 31 | * @param \Closure $next |
||
| 32 | * @return mixed |
||
| 33 | */ |
||
| 34 | public function handle($request, Closure $next) |
||
| 43 | |||
| 44 | } |
||
| 45 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.