Open singler009 opened 6 years ago
And where can i find tenant`s config of db connection ?
@singler009 tenant configuration for the database are created on the fly.
In RouteServiceProvider.php
public function map(Router $router)
{
.....
**$this->mapTenantRoutes($router);**
.....
}
protected function mapTenantRoutes(Router $router)
{
$router->middleware(['web', 'tenancy.enforce'])
->domain('{account}.yourapphostname')
->namespace($this->namespace)
->as('tenant.')
->group(base_path('routes/tenant/mytenantroutes.php'));
}
In mytenantroutes.php:
use Illuminate\Support\Facades\Route;
Route::group(['prefix' => 'profile'], function () {
Route::get('/', 'MyControllerController@action')->name('controller.action');
});
Hello, How can i organise web.php routs and judge which tenant in controller for url 'boise.townhouse.dev/show'. I have no idea to handle Hyn\Tenancy!
thank you!