Skip to content
Discussion options

You must be logged in to vote

I kept searching and found event listener that I can utilise.
Keyword: Statamic\Events\UserRegistered

  1. Add an Event Listener
php artisan make:listener UserRegisteredListener --event=UserRegistered
  1. Register this event listener in EventServiceProvider.php
protected $listen = [
    ...
    UserRegistered::class => [
	UserRegisteredListener::class
    ]
];
  1. Update the generated UserRegisteredListener.php file
    Change UserRegistered in function signature to User. (App\Models\User)
    Add your custom logic in handle()

Regarding emailing, check this https://laravel.com/docs/9.x/mail .

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by iannngit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant