kvnkrft's avatar

action="{{ route('register') }}" not in routes/web.php

Good morning,

This is probably a really silly question, but the registration form that Laravel Auth provides POSTs to {{ route('register') }} but that route is not defined in the routes/web.php file.

I am trying to understand how users are created, because I want to figure out how to create two different types of users. One that is fully created, and another who was invited, but hasn't completed the user creation.

Thanks in advance,

Kevin

PS: Is there a paid code-review / paid help service somewhere?

0 likes
4 replies
PaulClarke's avatar

If you look in your web.php file you will see that it calls a Auth::routes(); which ultimately calls the auth method in \Illuminate\Routing\Router.php. The auth method contains the routes I think you are looking for.

MiguelBarros's avatar

@kvnkrft You can also execute the command php artisan route:list to check the routes that you have and their names

kvnkrft's avatar

Thanks, @jorpedito. I looked for the \Illuminate\Routing\Router.php but couldn't even find that directory. Clearly, there's a secret to getting there.

Using the php artisan route:list command I found:

POST
register
App\Http\Controllers\Auth\RegisterController@register
web,guest

So I am assuming that I should be able to create a new user from anywhere.

Please or to participate in this conversation.