$user = new User; $user->name = 'John'; $user->email = 'john@example.com'; $user->save();
$user = User::find(1); $user->name = 'Jane'; $user->email = 'jane@example.com'; $user->save();In this example, we find the user with an ID of 1 using the find method. We then update the name and email fields and save the changes to the database using the save method. Package library: Laravel's Eloquent ORM.