/**
* 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);
});
}
/**
* Set a callback that should be used when creating the email verification URL.
*
* @param Closure $callback
* @return void
*/
public static function createUrlUsing($callback)
{
static::$createUrlCallback = $callback;
}