Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbedard authored Oct 23, 2019
1 parent 6a03c9c commit a13c996
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ $user = (new AccountManager)->getAuthenticatedUser();
Using this method to fetch the `User` model will trigger a `bedard.rainlabuserapi.afterGetUser` event. This can be useful useful when other data needs to be loaded with the user. In this example, we'll have a plugin load the user's avatar.

```php
class Plugin extends PluginBase
public function boot()
{
public function boot()
{
Event::listen('bedard.rainlabuserapi.afterGetUser', function ($user) {
$user->load(['avatar']);
});
}
Event::listen('bedard.rainlabuserapi.afterGetUser', function ($user) {
$user->load(['avatar']);
});
}
```

Expand Down

0 comments on commit a13c996

Please sign in to comment.