Skip to content

Commit

Permalink
Merge pull request #15 from sweet-greg/master
Browse files Browse the repository at this point in the history
updated ModelLock.php for Laravel 5.7 support
  • Loading branch information
jarektkaczyk authored Mar 15, 2019
2 parents df2e871 + 88085a3 commit fc8e940
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ModelLock.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class ModelLock extends Model
*/
protected static function boot()
{
parent::boot();

static::saving(function ($lock) {
if (!$lock->isDirty('locked_until')) {
$lock->locked_until = $lock->lockTimestamp();
Expand Down

0 comments on commit fc8e940

Please sign in to comment.