123456789101112131415161718192021222324 |
- <?php
- namespace App\Http\Middleware;
- use Closure;
- use Illuminate\Support\Facades\Auth;
- class HomeAuth
- {
- /**
- * @param $request
- * @param Closure $next
- * @param null $guard
- * @return mixed
- */
- public function handle($request, Closure $next, $guard = null)
- {
- if( $guard == 'member' && !Auth::guard($guard)->check() ){
- return redirect()->route('front.auth.login');
- }
- return $next($request);
- }
- }
|