cybercog / laravel-ban

Laravel Ban simplify blocking and banning Eloquent models.
https://komarev.com/sources/laravel-ban
MIT License
1.07k stars 63 forks source link

Send notification on unban #59

Closed antonkomarev closed 4 years ago

antonkomarev commented 4 years ago

@antonkomarev Is there any way:

When the user clicks a button, an unban link will be sent to that user's email address.

When the user clicks on the unban link or button it triggers a controller which trigger's this $user->unban which unbans the user.

Thank you, Unable to pull a request.

Originally posted by @Maxillarious in https://github.com/cybercog/laravel-ban/pull/40#issuecomment-637935598

antonkomarev commented 4 years ago

@Maxillarious

Listen to \Cog\Laravel\Ban\Events\ModelWasBanned event and dispatch email notification.