-
Notifications
You must be signed in to change notification settings - Fork 1
Update a Row
Gilberto Junior edited this page Nov 29, 2019
·
2 revisions
This method updates data from registry by ID.
public function update(array $data, int $id): Model|bool;
$instance = $repository->update([
'email' => '[email protected]',
], 1);
if ($instance === false) {
echo 'User #1 not found';
} else {
echo 'Data updated with new email ' . $instance->email;
}
by c0dehappy