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();


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.