Skip to content
Sumit Patil edited this page Jun 18, 2015 · 2 revisions

To update a record

$user = User::find(1);
$user->name = "New Name";
$user->save();

you can also update a record by performing query against any condition.

    $user = User::where('email', "[email protected]")
            ->update(['name' => "SomeName"]);

The update method expects an array of column and value pairs representing the columns that should be updated.

Clone this wiki locally