mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 20:54:03 +00:00
wip
This commit is contained in:
parent
c0d0dc99de
commit
4c20e30fcc
4 changed files with 13 additions and 3 deletions
|
|
@ -10,6 +10,7 @@ use Illuminate\Support\Facades\Route as Router;
|
|||
use Stancl\Tenancy\Contracts\Feature;
|
||||
use Stancl\Tenancy\Middleware;
|
||||
|
||||
// todo this got deleted in v4.
|
||||
class UniversalRoutes implements Feature
|
||||
{
|
||||
public static string $middlewareGroup = 'universal';
|
||||
|
|
|
|||
|
|
@ -27,7 +27,13 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
// Make sure Tenancy is stateful.
|
||||
$this->app->singleton(Tenancy::class);
|
||||
|
||||
foreach ($this->app['config']['tenancy.features'] ?? [] as $feature) {
|
||||
$this->app->resolving(Tenancy::class, function (Tenancy $tenancy, $app) {
|
||||
foreach ($this->app['config']['tenancy.features'] ?? [] as $feature) {
|
||||
$this->app[$feature]->bootstrap();
|
||||
}
|
||||
});
|
||||
|
||||
foreach ($this->app['config']['tenancy.tenant_unaware_features'] ?? [] as $feature) {
|
||||
$this->app[$feature]->bootstrap();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue