title: variable showing null value in view laravel
body: <p>i am trying to sent data to view from function in controller but the variable view is not showing any result</p>
  
  <pre><code>public function goedit($id)
  {
      $catg = Category::where('cat_id',$id)-&gt;first();
      return view('product.gocatedit')-&gt;with('row', $catg);
  }
  </code></pre>
  
  <p>and my view is</p>
  
  <pre><code> @if(isset($row))
  
                  &lt;form action="{{action('ProductController@edit')}}" method="post"&gt;
                    &lt;input type="hidden" name="_token" value="{{ csrf_token() }}"&gt;
                    &lt;div class="col-sm-12"&gt;
                      &lt;h1 style="text-align:center;"&gt;Edit Items&lt;/h1&gt;
                      &lt;table  class="table"&gt;
                              &lt;thead&gt;
                              &lt;tr&gt;
                                &lt;th&gt;ID&lt;/th&gt;
                                &lt;th&gt;Category&lt;/th&gt;
                                &lt;th&gt;Item&lt;/th&gt;
                                &lt;th&gt;Price&lt;/th&gt;
                                &lt;th&gt;&lt;/th&gt;
                              &lt;/tr&gt;
                              &lt;/thead&gt;
                              &lt;tbody&gt;
                              &lt;tr&gt;
                                &lt;input type="hidden" name="item_id" value="{{ $row-&gt;item_id}}"&gt;
                                &lt;td&gt;&lt;input class="form-control" name="item_name" value="{{$row-&gt;item_name}}" /&gt;&lt;/td&gt;
                                &lt;td&gt;&lt;input class="form-control" name="item_price" value="{{$row-&gt;item_price}}" /&gt;&lt;/td&gt;
                                &lt;td&gt;&lt;input class="btn btn-primary btn-block btn-flat" type="submit" value="Edit"&gt;&lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;/tbody&gt;
  
                      &lt;/table&gt;
                      &lt;/div&gt;
                  &lt;/form&gt;
              @endif  
  </code></pre>
  
  <p>please help thanks</p>