title: How to pass a value from one controller to another controller in laravel
body: <p>I am struggling with passing a variable from one controller method to another in laravel.</p>
  <p>When user creates a product, I want to let him know the result.</p>
  <p>Problem is that after Create method is executed, a message should be passed to one more controller before it goes to the view.</p>
  <p>I am trying to pass a success or failure message from postCreate method to getList method.</p>
  <p>Create method:</p>
  <pre><code>    public function postCreate() {
        if(validation passes){
            //create product
            return Redirect::to('admin/products/list/'.$current_section_id)
              -&gt;with('message', 'New Product Created');
           }
        else{
             return Redirect::to('admin/products/new)
              -&gt;with('message', 'Something went wrong');
           }
  
  }
  </code></pre>
  <p>getList method returns a user to the page he was before (current_section_id) and list products</p>
  <pre><code>public function getList($id){
          $message = Input::get('message');
          
          return View::make('products.list')
              -&gt;with('current_section_id', $id)
              -&gt;with('message', $message);
      }
  </code></pre>
  <p>I have tried to use <code>-&gt;with('message', $message);</code> to pass a message but it does not work like it works with forms in views.</p>
  <p>What is the right way to do it ?</p>