Commit 6033e200 by Alexander Makarov

added note about model validation

parent a8a7c43f
......@@ -162,6 +162,8 @@ $customer->save(); // equivalent to $customer->insert();
$customer = Customer::find($id);
$customer->email = 'james@example.com';
$customer->save(); // equivalent to $customer->update();
// Note that model attributes will be validated first and
// model will not be saved unless valid.
// to delete an existing customer record
$customer = Customer::find($id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment