33 lines
882 B
PHP
33 lines
882 B
PHP
<?php
|
|
|
|
namespace App\Core\Auth;
|
|
|
|
use Illuminate\Support\Carbon;
|
|
use Illuminate\Support\Facades\Config;
|
|
use Illuminate\Support\Facades\URL;
|
|
|
|
|
|
class VerifyEmail extends \Illuminate\Auth\Notifications\VerifyEmail {
|
|
/**
|
|
* Get the verification URL for the given notifiable.
|
|
*
|
|
* @param mixed $notifiable
|
|
* @return string
|
|
*/
|
|
protected function verificationUrl($notifiable)
|
|
{
|
|
if (static::$createUrlCallback) {
|
|
return call_user_func(static::$createUrlCallback, $notifiable);
|
|
}
|
|
|
|
return URL::temporarySignedRoute(
|
|
'verification.verify',
|
|
Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),
|
|
[
|
|
'id' => $notifiable->getKey(),
|
|
'hash' => sha1($notifiable->getEmailForVerification()),
|
|
],
|
|
false
|
|
);
|
|
}
|
|
}
|