Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel verify email custom url

/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
    ...

    VerifyEmail::createUrlUsing(function ($notifiable) {
        $frontendUrl = 'http://cool-app.com/auth/email/verify';

        $verifyUrl = URL::temporarySignedRoute(
            'verification.verify',
            Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),
            [
                'id' => $notifiable->getKey(),
                'hash' => sha1($notifiable->getEmailForVerification()),
            ]
        );

        return $frontendUrl . '?verify_url=' . urlencode($verifyUrl);
    });
}
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #laravel #verify #email #custom #url
ADD COMMENT
Topic
Name
4+8 =