mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 18:54:03 +00:00
wip
This commit is contained in:
parent
e7aefe6c09
commit
adc1b5e73e
2 changed files with 14 additions and 5 deletions
|
|
@ -5,8 +5,10 @@ declare(strict_types=1);
|
|||
namespace Stancl\Tenancy;
|
||||
|
||||
use Illuminate\Cache\CacheManager;
|
||||
use Illuminate\Contracts\Http\Kernel;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Stancl\Tenancy\Middleware\PreventAccessFromTenantDomains;
|
||||
use Stancl\Tenancy\TenancyBootstrappers\FilesystemTenancyBootstrapper;
|
||||
|
||||
class TenancyServiceProvider extends ServiceProvider
|
||||
|
|
@ -79,8 +81,13 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
|
||||
$this->loadRoutesFrom(__DIR__ . '/routes.php');
|
||||
|
||||
$this->app->make(Kernel::class)->prependMiddleware([
|
||||
Middleware\InitializeTenancy::class,
|
||||
]);
|
||||
|
||||
Route::middlewareGroup('tenancy', [
|
||||
\Stancl\Tenancy\Middleware\InitializeTenancy::class,
|
||||
/** Prevent access from tenant domains to central routes and vice versa. */
|
||||
Middleware\PreventAccessFromTenantDomains::class,
|
||||
]);
|
||||
|
||||
$this->app->singleton('globalUrl', function ($app) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue