feat: verify email

This commit is contained in:
2026-05-20 20:40:23 +02:00
parent 75b2743e75
commit 7892fb9a02
16 changed files with 495 additions and 9 deletions
+8
View File
@@ -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;