I have set up my subdomain domain routes like this:-
Route::group(['domain' => '{subdomain}.' . env('APP_URL'), 'prefix' => 'console', 'namespace' => 'admin', 'middleware' => 'subdomain'], function () {
Route::get('/login', 'LoginController@index')->name('admin.login');
});
And main domain routes like this-
Route::group(['prefix' => 'console', 'namespace' => 'admin', 'middleware' => 'maindomain'], function () {
Route::get('/login', 'LoginController@index')->name('admin.login');
});
Now in an email, I want to send the login url of the subdomain.
- If I simply write
route('admin.login')
it will give me the login
url of the main domain. url() . 'console/login'
will also give me
the login url of the main domain.
How can I get/print the login url of the subdomain?