Alnuaimi
Why did I not have this message appear?
I did it ,dose not work
public function authenticate(): ?LoginResponse { try { $this->rateLimit(5); } catch (TooManyRequestsException $exception) { Notification::make() ->title(('filament-panels::pages/auth/login.notifications.throttled.title', [ 'seconds' => $exception->secondsUntilAvailable, 'minutes' => ceil($exception->secondsUntilAvailable / 60), ])) ->body(array_key_exists('body', ('filament-panels::pages/auth/login.notifications.throttled') ?: []) ? __('filament-panels::pages/auth/login.notifications.throttled.body', [ 'seconds' => $exception->secondsUntilAvailable, 'minutes' => ceil($exception->secondsUntilAvailable / 60), ]) : null) ->danger() ->send(); return null; } // Retrieve form data $data = $this->form->getState(); if ($this->getLdapConnectionModel()?->isEnable == true) { $this->attemptLDAPConnection($data); } else { if (!Filament::auth()->attempt($this->getCredentialsFromFormData($data), $data['remember'] ?? false)) { $this->throwFailureValidationException(); } $user = Filament::auth()->user(); if ( ($user instanceof FilamentUser) && (!$user->canAccessPanel(Filament::getCurrentPanel())) ) { Filament::auth()->logout(); $this->throwFailureValidationException(); } session()->regenerate(); } return app(LoginResponse::class); }
15 replies
How To create exception for this Bug?
I Fixed It
set this code inside App\Exceptions\Handler.php
public function render($request, Throwable $exception)
{
if ($exception instanceof \Symfony\Component\Mailer\Exception\TransportExceptionInterface) {
// Handle the mail transport exception
return response()->json(['error' => 'Mail configuration error. Please check your environment settings.'], 500);
}
return parent::render($request, $exception);
}
11 replies
How To create exception for this Bug?
Symfony\Component\Mailer\Transport\Dsn::__construct(): Argument #2 ($host) must be of type string, null given, called in /var/www/html/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php on line 187
11 replies
How to Passing value for color in extraAttributes to them.css?
->extraAttributes(fn($record) => [
'class' => match ($record->compliance_status) {
'Compliant' => 'class-Compliant',
'Not Applicable' => 'class-Not-Applicable',
'Not Compliant' => 'class-Not-Compliant',
'Partially Compliant' => 'class-Partially-Compliant',
default => 'class-default', // Handle other cases if necessary
},
'style' => "color: " . $record->color . ";", // Add this line to set the color
])
15 replies