RegistrationResponse
How can I change the redirection url after the registration , I want to display a custom page , not the login form , and this is the register method :
public function register(): ?registrationSuccess
{
try {
$this->rateLimit(2);
} catch (TooManyRequestsException $exception) {
Notification::make()
->title(__('filament-panels::pages/auth/register.notifications.throttled.title', [
'seconds' => $exception->secondsUntilAvailable,
'minutes' => ceil($exception->secondsUntilAvailable / 60),
]))
->body(array_key_exists('body', __('filament-panels::pages/auth/register.notifications.throttled') ?: []) ? __('filament-panels::pages/auth/register.notifications.throttled.body', [
'seconds' => $exception->secondsUntilAvailable,
'minutes' => ceil($exception->secondsUntilAvailable / 60),
]) : null)
->danger()
->send();
return null;
}
$data = $this->form->getState();
$role = Role::where('name' , 'Seller')->first();
$data['role_id'] = $role->id;
$user = $this->getUserModel()::create($data);
$user->assignRole('Seller');
app()->bind(
\Illuminate\Auth\Listeners\SendEmailVerificationNotification::class,
\Filament\Listeners\Auth\SendEmailVerificationNotification::class,
);
event(new Registered($user));
// Filament::auth()->login($user);
// session()->regenerate();
// return app(registrationSuccess::class);
}
1 Reply
Maybe you want to do something similar to this
https://laraveldaily.com/post/filament-disable-dashboard-auto-redirect-url-after-login