“Laravel Verifikasi URL Kustom Email” Kode Jawaban

Laravel Verifikasi URL Kustom Email

/**
* 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;
}
Cooperative Cardinal

Laravel Verifikasi URL Kustom Email

/**
* 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);
    });
}
Cooperative Cardinal

Jawaban yang mirip dengan “Laravel Verifikasi URL Kustom Email”

Pertanyaan yang mirip dengan “Laravel Verifikasi URL Kustom Email”

Lebih banyak jawaban terkait untuk “Laravel Verifikasi URL Kustom Email” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya