title: Returning success error message in laravel
body: <p>I am trying to redirect with a success/error message. I currently have this code, but in this instance it doesn't seem to display anything.</p>
  
  <p>Controller:</p>
  
  <pre><code>return redirect()-&gt;action('Controller@index')-&gt;with('yes', 'Successfully subscribed');
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>@if (Session::get('yes'))
    &lt;div class="alert alert-success alert-dismissible fade show" role="alert"&gt;
       &lt;button type="button" class="close" data-dismiss="alert" aria-label="Close"&gt;
         &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
       &lt;/button&gt;
       {{ Session::get('yes') }}
     &lt;/div&gt;
  @endif
  @if (Session::get('no'))
    &lt;div class="alert alert-danger" role="alert"&gt;
      {{ Session::get('no') }}
    &lt;/div&gt;
  @endif
  </code></pre>