DONE: fix error where the verification uses localhost after user register, use malay name in membership application #16
@@ -38,6 +38,14 @@ class VerifyEmailNotification extends Notification
|
||||
protected function verificationUrl(User $notifiable): string
|
||||
{
|
||||
$expireMinutes = (int) config('auth.verification.expire_minutes', 60);
|
||||
$root = rtrim((string) config('app.url'), '/');
|
||||
|
||||
// Prefer APP_URL over the current request host so queued/local proxy
|
||||
// contexts do not embed http://localhost in production emails.
|
||||
URL::forceRootUrl($root);
|
||||
if ($scheme = parse_url($root, PHP_URL_SCHEME)) {
|
||||
URL::forceScheme($scheme);
|
||||
}
|
||||
|
||||
return URL::temporarySignedRoute(
|
||||
'verification.verify',
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
namespace Modules\Auth\Providers;
|
||||
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
@@ -24,4 +26,13 @@ class EventServiceProvider extends ServiceProvider
|
||||
* Configure the proper event listeners for email verification.
|
||||
*/
|
||||
protected function configureEmailVerification(): void {}
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
// Framework auto-registers SendEmailVerificationNotification on Registered.
|
||||
// Verification is user-initiated via the email verification banner instead.
|
||||
$this->app->booted(function () {
|
||||
Event::forget(Registered::class);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
@section('letter-reference', $application->application_number)
|
||||
|
||||
@section('letter-date', now()->translatedFormat('d F Y'))
|
||||
@section('letter-date', now()->locale('ms')->translatedFormat('d F Y'))
|
||||
|
||||
@section('letter-recipient')
|
||||
<strong>{{ $applicant->name }}</strong><br>
|
||||
|
||||
@@ -444,7 +444,7 @@ class MembershipApplicationService
|
||||
'application' => $application,
|
||||
'applicant' => $applicant,
|
||||
'boardMeetingReference' => $boardMeetingReference,
|
||||
'boardMeetingDate' => Carbon::parse($boardMeetingDate)->translatedFormat('d F Y'),
|
||||
'boardMeetingDate' => Carbon::parse($boardMeetingDate)->locale('ms')->translatedFormat('d F Y'),
|
||||
'isPassed' => $isPassed,
|
||||
'letterSubject' => $isPassed
|
||||
? 'KELULUSAN PERMOHONAN MENJADI ANGGOTA KOPERASI PERMODALAN KELANTAN BERHAD (KoPKB)'
|
||||
|
||||
Reference in New Issue
Block a user