Switch between all domains of your project on development mode
$ composer require komicho/laravel-switch-domain dev-master
set_domain('<domain.dev>');
KOMICHO_SWITCH_DOMAIN_TO=<domain.dev>
If the value is empty, the domains will work in their default form
use set_domain
method on domain
method .. such as the following example
...
->domain(set_domain('<domain.dev>'))
...
Go to file app/Providers/RouteServiceProvider.php
.
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->domain(set_domain('domain.dev'))
->group(base_path('routes/web.php'));
}
protected function mapAppRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->domain(set_domain('app.domain.dev')))
->group(base_path('routes/app.php'));
}
According to rules MPL :)
THX.