laravel/laravel — pull request #986 by resmo (2012-07-21 13:07:27+00:00)
Title: Implemented Optimistic Locking in Eloquent ORM.

I implemented with an additional where, no extra query is needed. This closes #922.

In the DB: Field `lock_version` (INT) must be set.

In model:
```
name = "foo";
$user1->save();

$user2->name ="bar";
$user2->save(); // should throw an exception
```

Signed-off-by: René Moser