© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
35 replies
Zoltar

Email Verification in afterCreate() event

Hello,
I have an application with two panels: admin and employee

Admin creates employee accounts and sends the email for verification

i use the code below in afterCreate() event

use Filament\Notifications\Auth\VerifyEmail;
use Filament\Facades\Filament;

protected function afterCreate(): void
{
    $user = $this->getRecord();

    $notification = new VerifyEmail();
    $notification->url = Filament::getVerifyEmailUrl($user);
    $user->notify($notification);
}
use Filament\Notifications\Auth\VerifyEmail;
use Filament\Facades\Filament;

protected function afterCreate(): void
{
    $user = $this->getRecord();

    $notification = new VerifyEmail();
    $notification->url = Filament::getVerifyEmailUrl($user);
    $user->notify($notification);
}

the email is sent correctly but Employee not have permission to access admin Panel and can't confirm the mail


How can I solve the problem?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Stack in email verification
FilamentFFilament / ❓┊help
3mo ago
Email Verification
FilamentFFilament / ❓┊help
3y ago
email verification
FilamentFFilament / ❓┊help
3y ago
Email Verification?
FilamentFFilament / ❓┊help
3y ago