title: Eloquent - Login and keep User logged in | laravel 5.4
body: <p>How do you keep a User logged in without using the Auth facade?
  I managed to check for matched credentials but I do not know how to keep the User logged in.. Do I just set a session entry with the ID of the logged in user?</p>
  
  <p><strong>Here is the function that handles the credentials check</strong></p>
  
  <pre><code>public function postLogin(Request $request) {
          $pushUser = \App\PushUser::where([
              'email' =&gt; $request-&gt;useremail,
              'password' =&gt; $request-&gt;userpassword
              ])-&gt;first();
  
          if(!$pushUser) {
              return Redirect::back(); // No such user in database, go back to login route
          }
          // Login user, make sure he stays logged in until he loggs out or the session expires
          return Redirect::route('home'); // Redirect to home route
      }
  </code></pre>
  
  <p>Please excuse me for this stupid question, I'm really new to website authentication.. I'd just place a session entry with the ID of the logged in user, but this seem too dangerous, because I fear that someone cracks the session / cookie ID..</p>