How To Use Update Query In Laravel ?


/ Published in: PHP
Save to your folder(s)

Updating a record in Laravel using Eloquent.


Copy this code and paste it in your HTML
  1. $user=User::where(['id'=>1])->first();
  2. $user->name='abc';
  3. $user->age='22';
  4. $user->save();

URL: https://www.alltopinterviewquestions.com/laravel-interview-questions/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.