Level 1
Hello,
10 months after I would be very interested on how you finally tackled (I hope) this issue.
Thanks
Hi all, i'm creating an admin area for my application and am putting it under an "admin" subdomain i.e. admin.example.com
I've set up a route group like so, and placed it at the top of my routes.php
Route::group([
'domain' => 'admin.localhost',
'as' => 'admin',
'namespace' => 'Admin'
], function () {
Route::get('', [
'as' => '.dashboard',
'uses' => 'DashboardController@index'
]);
// etc...
});
I'll add some middleware in later to check that the user has admin privileges, but i've noticed that I can access the main application's pages on the subdomain e.g. admin.example.com/about or admin.example.com/contact..
Many thanks.
Please or to participate in this conversation.