/** * Handle the event. * * @param UserRegisteredThroughSocialite $event * @return void */ public function handle(UserRegisteredThroughSocialite $event) { $user = $event->user; // Notify slack channel, should probably change to new user event and move this to the event handler Notification::send(User::find($user->getAttribute('id')), new NewUser($user)); }
/** * Handle the event. * * @param NewTentSiteRegistered $event * @return void */ public function handle(NewTentSiteRegistered $event) { $tentSite = $event->tentSite; Notification::send(TentSites::find($tentSite->getAttribute('id')), new NewTentSite($tentSite)); }
/** * Handle the event. * * @param FooEvent $event * @return void */ public function handle(Registered $event) { /** @var User $user */ $user = $event->user; Notification::send($user, new VerifyAccount($user->email_token, $user->username)); }