Skip to content

Commit

Permalink
Fix Event::on usage examples syntax in docs #291
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxer committed Nov 15, 2018
1 parent 6aa048c commit 268c189
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/events/user-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ Event::on(AdminController::class, UserEvent::EVENT_BEFORE_CREATE, function (User
$user = $event->getUser();

// ... your logic here
}
});

// This will happen at the model's level
Event::on(User::class, UserEvent::EVENT_BEFORE_CREATE, function (UserEvent $event) {

$user = $event->getUser();

// ... your logic here
}
});

```

Expand Down

0 comments on commit 268c189

Please sign in to comment.