laravel - update function is not working -


i trying update database user code , not working . there no change way!

 public function update( request $request)     {          $request->user()->tasks()->where('id', '=', $request->id)->update([             'name' => $request->title,             'body' => $request->body,         ]);           return redirect('/request');      } 

try code , update database:  app\user::find($request->id)->tasks()->update([     'name' => $request->title,     'body' => $request->body ]);   return redirect('/request'); 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo