1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace App\Listeners;
- use App\Events\CardCertifiedEvent;
- use App\Repositories\InviteNewUserRepository;
- use Illuminate\Queue\InteractsWithQueue;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Support\Facades\Log;
- class CardCertifiedListener
- {
- protected $inviteNewUserRepository;
- /**
- * Create the event listener.
- *
- * @return void
- */
- public function __construct(InviteNewUserRepository $inviteNewUserRepository)
- {
- //
- $this->inviteNewUserRepository = $inviteNewUserRepository;
- }
- /**
- * Handle the event.
- *
- * @param CardCertifiedEvent $event
- * @return void
- */
- public function handle(CardCertifiedEvent $event)
- {
- //
- $user = $event->user;
- $this->inviteNewUserRepository->updateCardCertified($user->id);
- }
- }
|