title: Laravel view passed value not capturing Undefined variable: val1
body: <p>I have my controller and via that I am calling a new view which is a blade too.</p>
  
  <pre><code> $var1="value1";
   $var2="value2";
   //return view('viewcall2', compact('var1','var2''));*/
   $data = array('var1'=&gt;$var1, 'var2'=&gt;$var2);
   return view('viewcall2')-&gt;with($data);
  </code></pre>
  
  <p>In the blade I call this.But I am getting this error Undefined variable: val1</p>
  
  <pre><code>&lt;div class="form-group"&gt;
                              {!! Form::label('VType', 'V Type', ['class' =&gt; 'col-md-4 control-label']) !!}
                              &lt;div class="col-md-6"&gt;
                                   &lt;div class="col-md-6"&gt;
                                      &lt;label for="price"&gt;{{ $val1 }}&lt;/label&gt;
  
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  </code></pre>