I have a laravel application which I Extended with this route:
Route::domain('{account}'.'.app.test')->group(function () {
return '{account}'."-test";
});
I am using laragon (wamp stack) so localhost/myapp
Maps tp app.test
but how do I call a random subdomain locally in my browser?
If I for instance try to call subdomain.app.test
I get a page not found message from telekom (live in Germany).
How can I configure this to make it work locally?
The domain syntax should be:
Route::domain('{account}.example.com')->group(function() {
Route::get('user/{id}', function($account, $id) {
//code
});
});
Please refer to the documentation https://laravel.com/docs/5.7/routing#route-group-sub-domain-routing
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.