123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php namespace App\Http\Filters;
- use Illuminate\Contracts\Auth\Authenticator;
- use Illuminate\Http\RedirectResponse;
- class GuestFilter {
-
- protected $auth;
-
- public function __construct(Authenticator $auth)
- {
- $this->auth = $auth;
- }
-
- public function filter()
- {
- if ($this->auth->check())
- {
- return new RedirectResponse(url('/'));
- }
- }
- }
|