Browse Source

added note about model validation

tags/2.0.0-beta
Alexander Makarov 12 years ago
parent
commit
6033e20025
  1. 2
      docs/guide/active-record.md

2
docs/guide/active-record.md

@ -162,6 +162,8 @@ $customer->save(); // equivalent to $customer->insert();
$customer = Customer::find($id); $customer = Customer::find($id);
$customer->email = 'james@example.com'; $customer->email = 'james@example.com';
$customer->save(); // equivalent to $customer->update(); $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 // to delete an existing customer record
$customer = Customer::find($id); $customer = Customer::find($id);

Loading…
Cancel
Save