Files
timebank-cc-public/app/Notifications/VerifyProfileEmail.php
Ronald Huynen 2547717edb Initial commit
2026-03-23 21:37:59 +01:00

39 lines
967 B
PHP

<?php
namespace App\Notifications;
use Illuminate\Auth\Notifications\VerifyEmail;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Str;
class VerifyProfileEmail extends VerifyEmail
{
/**
* Get the name of the queue the notification should be sent on.
*
* @return string
*/
public function viaQueue()
{
return 'high';
}
protected function verificationUrl($notifiable)
{
$baseName = class_basename($notifiable); // e.g. "Organization"
$type = Str::lower($baseName);
// Use $notifiable->id for an organization, bank, admin ID
return URL::temporarySignedRoute(
'verification.verify',
Carbon::now()->addMinutes(60),
[
'type' => $type,
'id' => $notifiable->id,
'hash' => sha1($notifiable->getEmailForVerification()),
]
);
}
}