Skip to content

Not sure how to listen for UserLevelledUp #70

Closed Answered by cjmellor
Supernova3339 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

It looks like you're doing it right, and the Laravel docs say it should auto-discover the events.

I noticed the same thing too when I tried replicating this.

I seem to have managed to get around it by adding this to AppServiceProvider

Event::listen(
    events: \LevelUp\Experience\Events\UserLevelledUp::class,
    listener: \App\Listeners\CelebrateUserLevelUp::class,
);

See if that works for you.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Supernova3339
Comment options

Answer selected by Supernova3339
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants