title: Laravel , sessions just work for 1 online user
body: <p>I'm new in laravel</p>
  
  <p>I coded a script that many users may work with</p>
  
  <p>but the problem that I have is this :</p>
  
  <p>when a user like "Helen" signs in she can see her profile
  but if next another user like "Maria" logs on , Marias panel will be shown for both of them</p>
  
  <p>I think it means just one session can be active at the same time and the value of session will be for the latest user
  and the older users session doesn't expire just the value in the session will be changed , thus she identifies as another user and can see that users profile, and also when a user logs out , because of close of the session , all users will be signed out.
  here is my simple code :</p>
  
  <pre><code>public function Login(){
          $this-&gt;Token();
          $pack=Input::all();
          try {
             $result=DB::table('user')-&gt;where('Email','=',$pack['email'])-&gt;get();
              if (Hash::check($pack['password'], $result[0]-&gt;Password)){
                  session(['there' =&gt; $result['0']-&gt;Email]);
                  return redirect('dashboard');
              }
              return redirect('dashboard')-&gt;with('does','wrong password');
          }catch(Exception $e){
              return redirect('dashboard')-&gt;with('does',.$e);
          }
  }
  
  public function UserType() {
          if(!session('there'))
              return "Not Logged";
          else {
              $result = DB::table('user')-&gt;where('Email', '=', session('there'))-&gt;get();
  
          if($result!=null)
              return "User";
  }
  
  public function ShowDashboard(){
          if($this-&gt;UserType()=="Not Logged")
          else
              return view('pages/dashboard');
  }
  </code></pre>