title: Check if session exists inside blade template - Laravel
body: <p>Currently I have the below code in one of my vanilla <code>php</code> files</p>
  
  <pre><code>&lt;?php 
  
  if (isset($_SESSION['qwick'])) {
      include "checkout-lin.php";
  } else {
      include "checkout-nlin.php";
  }
  
  ?&gt;
  </code></pre>
  
  <p>How can I do the same in laravel. I have created 2 files in my <code>includes</code> folder named <code>loggedinclude.blade.php</code> and <code>notloggedinclude.blade</code> and I now want to add them in a page <code>checkstatus.blade.php</code></p>
  
  <p>Also I'm able to set a session like this</p>
  
  <pre><code>$vars = [
      "email" =&gt; $email,
      "password" =&gt; $password,
      "firstname" =&gt; $row['firstName'],
      "lastname" =&gt; $row['lastName'],
      "id" =&gt; $row['id']
  ];
  
  session()-&gt;put('blog', $vars);
  </code></pre>
  
  <p>From the above code, I'm creating an array then putting the array in a session called blog thereby setting the a session called blog. and now I want to be able to check if a session named blog has been set. blog then has variable email etc</p>
  
  <p>FYI; </p>
  
  <p>my first question is checking for session exist in blade</p>
  
  <p>my second question is checking for named session exist in controller</p>
  
  <p>The documentation only has code for checking <code>session</code> items</p>
  
  <pre><code>if ($request-&gt;session()-&gt;has('users')) {
      //
  }
  </code></pre>