Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

chords's avatar

Change Spark's registration route

The app I'm building is nearing a beta, and what I'd like to do is redirect users that reach the registration page to a page about the beta (success, on that front). However, I'd still like the registration page to be available, but under something like /register-early-access.

In the Spark source, I have:

$router->get('/register', 'Auth\RegisterController@showRegistrationForm')->name('register');

In my web.php I tried:

Route::get('/register-early-access', 'Auth\RegisterController@showRegistrationForm')->name('register');

and got the following error: View [auth.register] not found.

Can someone help me out and/or recommend a better way to achieve the goal of providing a subset of users with the registration page (without making a mess of the Spark source files)?

0 likes
2 replies
mstrauss's avatar

I think that Laravel Spark uses register as a named route in its Vendor route.php file. Try changing the name register to something more bespoke. Or just get rid of the name on your new route all together.

chords's avatar

It looks like the issue is covered here:

https://github.com/laravel/framework/issues/9206

The short of it is: namespaces -- what I had was defaulting to the Laravel auth functionality rather than the Spark auth functionality and I'm not seeing a clean way to do what I want to do. I thought I could provide a new route with a fully qualified namespace complete with a leading slash.

Route::get('/new-register', '\spark\src\Http\Controllers\Auth\RegisterController@showRegistrationForm');

Please or to participate in this conversation.