title: Laravel - Redirect with both data and message
body: <p>This is my categories list page.</p>
  
  <p><a href="https://i.stack.imgur.com/pspJb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pspJb.png" alt="enter image description here"></a></p>
  
  <p>To load this page Controller code is</p>
  
  <pre><code>public function categorysettings(Request $request)
  {
    $categorieslist=productcategory::all();
    return view('categorieslist',compact('categorieslist'));
  }
  </code></pre>
  
  <p>now when i click delete button this code is executed.</p>
  
  <pre><code>public function deletecategory($categoryid)
  {
     $category = productcategory::find($categoryid);
     $category-&gt;delete();
     $categorieslist=productcategory::all();
     return Redirect::back()-&gt;with('deleted','Successfully Deleted Category !!!');
  
  }
  </code></pre>
  
  <p>In my html page i have session names as deleted to display the message.
  But whenever i click delete button the data gets deleted but it show like this.
  <a href="https://i.stack.imgur.com/GAoQy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GAoQy.png" alt="enter image description here"></a></p>
  
  <p>Any Help or suggestion are most welcome.</p>
  
  <p>As per request my view file code is below.Thank you.</p>
  
  <pre><code>    @if(Session::has('deleted'))
          &lt;div class="row"&gt;
              &lt;div class="col-md-8 col-md-offset-2"&gt;
                  &lt;div class="alert alert-danger"&gt;
                      {{Session::get('deleted')}}
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      @endif
  </code></pre>