title: Execute Laravel controller first instead of a modal popup
body: <p>I am using Laravel as a PHP framework. And I am using an iframe (as a modal) where I show a form. So, what I want to do is if a user is not logged in, don't show the modal at all, but I am getting a modal even if the user is not logged in. </p>
  
  <p>This is my controller</p>
  
  <pre><code>   public function index()
      //If logged in return back
     {       
          if (auth()-&gt;guard('web')-&gt;check())
          {   
              return back()-&gt;withMessage('you are already logged in');
          }
   return view('myview');
  </code></pre>
  
  <p>So, a modal is shown where it redirects back, but I don't want to show it in the iframe modal. </p>