title: how to put only session auth in laravel
body: <p><strong>Web.php</strong></p>
  
  <pre><code>Route::group(['middleware'=&gt;'auth:admin'], function(){
      Route::resource('dashboard', 'DashboardController');
  
      Route::group(['prefix'=&gt;'users','namespace'=&gt;'User','as'=&gt;'u.'], function(){
          Route::resource('list',     'ListController');
          Route::resource('segments', 'SegmentController');
      });
      Route::group(['prefix'=&gt;'sales','namespace'=&gt;'Sales','as'=&gt;'s.'], function(){
          Route::resource('credits',   'CreditController');
          Route::resource('packages',  'PackageController');
      });
  });
  </code></pre>
  
  <p><strong>RedirectIfAuthenticated</strong></p>
  
  <pre><code>class RedirectIfAuthenticated
  {
      public function handle($request, Closure $next, $guard)
      {
          if(Session::has('admin_session')){
              return redirect('admin/dashboard');
          }
      // if (Auth::guard($guard)-&gt;check()) {
      //     return redirect(RouteServiceProvider::HOME);
      // }
  
          return $next($request);
      }
  }
  </code></pre>
  
  <p><strong>AuthController</strong></p>
  
  <pre><code>public function login(Request $request)
  {
      $serviceAccount = ServiceAccount::fromJsonFile(__DIR__.'/firebaseKey.json');
      $firebase= (new Factory)-&gt;withServiceAccount($serviceAccount)-&gt;create();
      $this-&gt;database = $firebase-&gt;getDatabase();
  
      $auth = $firebase-&gt;getAuth();
      // if (Auth::guard('admin')-&gt;attempt(['email' =&gt; $request-&gt;email, 'password' =&gt; $request-&gt;password])) {
         //      return redirect('admin/dashboard');
      // }
      try {
          if($user = $auth-&gt;verifyPassword($request-&gt;email,$request-&gt;password)){
              Session::put('admin_session',$user);
              return redirect('admin/dashboard');
          }
      } catch (\Kreait\Firebase\Exception\Auth\InvalidPassword $e) {
          echo 'wrong password'; die();
      } catch (\Kreait\Firebase\Auth\SignIn\FailedToSignIn $e) {
          echo 'invalid email'; die();
      }
  }
  </code></pre>
  
  <p>How to put only session authentication on above-mentioned routes?
  As I want to put <strong>firebase</strong> authentication so laravel's wouldn't work here, </p>
  
  <p>So I just want to implement simple <code>isset(session('admin_session'))</code> functionality which will be common for all routes...</p>
  
  <p>Anyone, please suggest me how to implement it... it keeps redirecting!</p>