feat: verify email
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Broadcasting\ExpoPushChannel;
|
||||
use App\Mail\VerifyAccount;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Notifications\VerifyEmail;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
@@ -39,6 +42,11 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
Notification::extend('expo', fn ($app) => $app->make(ExpoPushChannel::class));
|
||||
|
||||
VerifyEmail::toMailUsing(
|
||||
fn (User $notifiable, string $verificationUrl): VerifyAccount => (new VerifyAccount($notifiable, $verificationUrl))
|
||||
->to($notifiable->getEmailForVerification())
|
||||
);
|
||||
|
||||
Gate::define('viewApiDocs', function ($user = null) {
|
||||
// Option A : Autoriser tout le monde (Attention : la doc sera publique hors local)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user