title: Modal to show upon redirect (Laravel)
body: <p>I am trying to get a modal to show upon redirect to a page.</p>
  
  <p>I am following this response (<a href="https://stackoverflow.com/questions/27639364/laravel-how-to-redirect-back-to-boostrap-modal-dialog-window">Laravel how to redirect back to boostrap modal dialog window</a>)</p>
  
  <p><strong>My controller:</strong></p>
  
  <pre><code>return redirect('postings')-&gt;with('welcome_msg');
  </code></pre>
  
  <p><strong>My view</strong>:</p>
  
  <pre><code>@if(Session::has('welcome_msg'))        
  &lt;script&gt;
  $(function() {
  $('#myModal').modal('show');
  });
  &lt;/script&gt;
  @endif
  
  &lt;div class="modal fade" id="myModal role="dialog" aria-hidden="true"&gt;
  &lt;div class="modal-dialog" role="document"&gt;
  &lt;div class="modal-content"&gt;
    &lt;div class="modal-header"&gt;
      &lt;h5 class="modal-title" id="exampleModalLabel"&gt;Modal title&lt;/h5&gt;
      &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;
        &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
      &lt;/button&gt;
    &lt;/div&gt;
    &lt;div class="modal-body"&gt;
      ...
    &lt;/div&gt;
    &lt;div class="modal-footer"&gt;
      &lt;button type="button" class="btn btn-secondary" data-dismiss="modal"&gt;Close&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>However, the modal is not showing upon pop-up. What am I doing wrong? </p>