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

Commit a13c996

Browse files
authored
Update README.md
1 parent 6a03c9c commit a13c996

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ $user = (new AccountManager)->getAuthenticatedUser();
2424
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.
2525

2626
```php
27-
class Plugin extends PluginBase
27+
public function boot()
2828
{
29-
public function boot()
30-
{
31-
Event::listen('bedard.rainlabuserapi.afterGetUser', function ($user) {
32-
$user->load(['avatar']);
33-
});
34-
}
29+
Event::listen('bedard.rainlabuserapi.afterGetUser', function ($user) {
30+
$user->load(['avatar']);
31+
});
3532
}
3633
```
3734

0 commit comments

Comments
 (0)