I am working on laravel and need to create subdomain using laravel dynamically without going cPanel or server setting.
Say here I have abc.xyz.com and I want create {subdomain}.abc.xyz.com . where subdomain will dynamic.
To access I have Use following code in laravel route.
Route::group(['domain' => 'abc.xyz'], function()
{
return 'Main page will be loaded';
});
Route::group(['domain' => '{subdomain}.abc.xyz'], function()
{
return 'Subdomain page will be loaded';
});
Also I have searched, but just found only way by .htaccess .
Is it the only way to do this or is there any other ways also to create subdomain dynamically.