title: Laravel redirect back with variable not working
body: <p>i am building a laravel aplication and  i have this line of code which  should redirect the user back to form he just submited , with the old input and the result of some operations . </p>
  
  <pre><code> return back()-&gt;with(["result" =&gt; round($area, 2)])-&gt;withInput($request-&gt;all());
  </code></pre>
  
  <p>The problem is that i only receive the old input in blade and the <code>$result</code> variable is not available in the view.</p>
  
  <p>This is how i try to output the result:</p>
  
  <pre><code>&lt;input type="text" name="result" value="{{isset($result)&amp;&amp;old('roofType')==0?$result:''}} &amp;#x33a1; " class="form-control input-sm" &gt;
  </code></pre>
  
  <p>And here is what variables i have in the view after submit:</p>
  
  <pre><code>{{ dd(get_defined_vars()['__data']) }}:
  
  array:7 [▼
           "__env" =&gt; Factory {#89 ▶}
           "app" =&gt; Application {#3 ▶}
           "errors" =&gt; ViewErrorBag {#169 ▶}
           "roofName" =&gt; "Acoperis intr-o apa"
           "roofType" =&gt; "1"
           "roofFolder" =&gt; "A1"
           "baseFields" =&gt; array:3 [▼
                                    0 =&gt; "L"
                                    1 =&gt; "l"
                                    2 =&gt; "H"
                                    ]
            ]
  </code></pre>