Skip to content

Removing 'admin' subdomain from login route #1146

Answered by pboivin
iliabaan asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @iliabaan,

The most simple way to handle this would be with a redirect:

// add to file: routes/web.php

Route::redirect('/login', '/admin/login');

This will not hide the /admin prefix but it'll give you the option of sharing a "cleaner" URL, like myapp.com/login.

You could also add /login as an alias to /admin/login, without needing to override anything from Twill:

// add to file: routes/web.php

use A17\Twill\Http\Controllers\Admin\LoginController;

Route::get('login', [LoginController::class, 'showLoginForm']);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@iliabaan
Comment options

Answer selected by iliabaan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants