dembilesmana's avatar

where the jetstream route is placed

I installed laravel 8 using --jet and livewire, where do they list the routes that come with jetstream?

I saw them using artisan route: list

0 likes
12 replies
dembilesmana's avatar

where is it triggered so that the route can be registered in the app? basically I want to adjust the auth feature on jetstream.

1 like
dembilesmana's avatar

jetstream routes are not listed in routes / web.php but they do. and he exists only in the root domain.

for example in laravel ui I can call Auth: routes () across multiple domain groups.

Route::domain('sub1.example.dev')->group( function () {
	Auth:routes();
	.....
});

Route::domain('sub2.example.dev')->group( function () {
	Auth:routes();
	.....
});
dembilesmana's avatar

I found it in vendor/laravel/fortify/routes/routes.php, but how / where is this called?

1 like
ekrist1's avatar

You will find how it's called here: /vendor/laravel/fortify/src/FortifyServiceProvider.php. Booted through the service provider.

dembilesmana's avatar

@ekrist1

meaning I can't do what I did with laravel/ui on jetstream or fortify?

Route::domain('sub1.example.dev')->group( function () {
	Auth:routes();
	.....
});

Route::domain('sub2.example.dev')->group( function () {
	Auth:routes();
	.....
});
aliharis's avatar

Jetstream also uses Fortify does provide a configuration option to specify the domain for the routes.

You can find domain config in config/fortify.php.

ekrist1's avatar

To override the URL paths for login, logout and register you will need to make the following adjustments in your fortifyserviceprovider.php:

//add this code to the register method
Fortify::ignoreRoutes();  

After adding the ignoreroutes you could copy and use the routes defined in /vendor/laravel/fortify/routes/routes.php as a starting point to your web.php file

3 likes
bobbybouwmann's avatar

@ekrist1 is correct here.

This is a different approach than Laravel UI, but it's also a different auth system ;)

dzendigital's avatar

I will be appreciated if you help me with routes of laravel 8 app. The case is that after I installed jetstream I saw new routes as author mentioned, but now /routes/web.php does not react if I put any other route in there.

Is there any other place I should place any new routers I need?

Should I place it all in /vendor/laravel/fortify/routes/routes.php?

I do not need to override the URL paths for login, logout and register but I did't get the way to make a routing with Jetstream.

Snapey's avatar

@dzendigital put your routes in web.php as before but note that the syntax has changed and you niw need to specify the full class path

Please or to participate in this conversation.