This commit is contained in:
Gregory Letellier
2023-11-28 12:13:50 +01:00
commit d5b3ccabd9
537 changed files with 32146 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Listeners;
use App\Models\User;
use App\Notifications\SendApiTokenNotification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
class UserMailVerified
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param object $event
* @return void
*/
public function handle($event)
{
$user = $event->user;
$token = $user->createToken("api_token")->plainTextToken;
$notif = new SendApiTokenNotification($token);
$user->notify($notif);
}
}