title: Laravel 5.3 update row returns Call to a member function update() on null
body: <p>I ran into a problem with updating a row in my database. As soon as I submit my update form it return and error <code>Call to a member function update() on null</code> Can someone tell me what I'm doing wrong here?</p>
  
  <p>My code:</p>
  
  <pre><code>public function update(Request $request){
        $user = Auth::user();
        $uid = $user-&gt;farmTag;
  
        $cowValues = array(
            'KilledOn' =&gt; $request['KilledOn'],
            'EID' =&gt; $request['EID'],
            'ManagementI/D' =&gt; $request['ManagementID'],
            'name' =&gt; $request['name'],
            'breed' =&gt; $request['breed'],
            'sex' =&gt; $request['sex'],
            'DOB' =&gt; $request['DOB'],
            'BoughtOn' =&gt; $request['BoughtOn'],
            'description' =&gt; $request['description'],
            'farmTag' =&gt; $uid,
        );
  
        Cow::find($request['EID'])-&gt;update($cowValues);
  
        return back();
  
      }
  </code></pre>
  
  <p>Full error:</p>
  
  <pre><code>in CowsController.php line 280
  at CowsController-&gt;update(object(Request))
  at call_user_func_array(array(object(CowsController), 'update'), array(object(Request))) in compiled.php line 9355
  at Controller-&gt;callAction('update', array(object(Request))) in compiled.php line 9382
  at ControllerDispatcher-&gt;dispatch(object(Route), object(CowsController), 'update') in compiled.php line 8440
  at Route-&gt;runController() in compiled.php line 8421
  at Route-&gt;run(object(Request)) in compiled.php line 8117
  at Router-&gt;Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 9948
  at SubstituteBindings-&gt;handle(object(Request), object(Closure)) in compiled.php line 9840
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in Authenticate.php line 43
  at Authenticate-&gt;handle(object(Request), object(Closure)) in compiled.php line 9840
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3121
  at VerifyCsrfToken-&gt;handle(object(Request), object(Closure)) in compiled.php line 9840
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13430
  at ShareErrorsFromSession-&gt;handle(object(Request), object(Closure)) in compiled.php line 9840
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 11874
  at StartSession-&gt;handle(object(Request), object(Closure)) in compiled.php line 9840
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13176
  at AddQueuedCookiesToResponse-&gt;handle(object(Request), object(Closure)) in compiled.php line 9840
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 13113
  at EncryptCookies-&gt;handle(object(Request), object(Closure)) in compiled.php line 9840
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 9825
  at Pipeline-&gt;then(object(Closure)) in compiled.php line 8118
  at Router-&gt;runRouteWithinStack(object(Route), object(Request)) in compiled.php line 8109
  at Router-&gt;dispatchToRoute(object(Request)) in compiled.php line 8100
  at Router-&gt;dispatch(object(Request)) in compiled.php line 2446
  at Kernel-&gt;Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3183
  at CheckForMaintenanceMode-&gt;handle(object(Request), object(Closure)) in compiled.php line 9840
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in compiled.php line 9825
  at Pipeline-&gt;then(object(Closure)) in compiled.php line 2390
  at Kernel-&gt;sendRequestThroughRouter(object(Request)) in compiled.php line 2374
  at Kernel-&gt;handle(object(Request)) in index.php line 53
  </code></pre>
  
  <p>If there's some missing information, please let me know.</p>
  
  <p>Thanks!</p>