mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 18:54:03 +00:00
Move Vite bundler to an Optional Feature
This commit is contained in:
parent
75cb428372
commit
4d2549a906
3 changed files with 20 additions and 3 deletions
|
|
@ -169,6 +169,7 @@ return [
|
||||||
// Stancl\Tenancy\Features\UniversalRoutes::class,
|
// Stancl\Tenancy\Features\UniversalRoutes::class,
|
||||||
// Stancl\Tenancy\Features\TenantConfig::class, // https://tenancyforlaravel.com/docs/v3/features/tenant-config
|
// Stancl\Tenancy\Features\TenantConfig::class, // https://tenancyforlaravel.com/docs/v3/features/tenant-config
|
||||||
// Stancl\Tenancy\Features\CrossDomainRedirect::class, // https://tenancyforlaravel.com/docs/v3/features/cross-domain-redirect
|
// Stancl\Tenancy\Features\CrossDomainRedirect::class, // https://tenancyforlaravel.com/docs/v3/features/cross-domain-redirect
|
||||||
|
// Stancl\Tenancy\Features\ViteBundler::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
19
src/Features/ViteBundler.php
Normal file
19
src/Features/ViteBundler.php
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Stancl\Tenancy\Features;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Vite as BaseVite;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
use Stancl\Tenancy\Contracts\Feature;
|
||||||
|
use Stancl\Tenancy\Tenancy;
|
||||||
|
use Stancl\Tenancy\Vite;
|
||||||
|
|
||||||
|
class ViteBundler implements Feature
|
||||||
|
{
|
||||||
|
public function bootstrap(Tenancy $tenancy): void
|
||||||
|
{
|
||||||
|
App::singleton(BaseVite::class, Vite::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||||
namespace Stancl\Tenancy;
|
namespace Stancl\Tenancy;
|
||||||
|
|
||||||
use Illuminate\Cache\CacheManager;
|
use Illuminate\Cache\CacheManager;
|
||||||
use Illuminate\Foundation\Vite as BaseVite;
|
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper;
|
use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper;
|
||||||
|
|
@ -70,8 +69,6 @@ class TenancyServiceProvider extends ServiceProvider
|
||||||
return new Commands\Seed($app['db']);
|
return new Commands\Seed($app['db']);
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->app->singleton(BaseVite::class, Vite::class);
|
|
||||||
|
|
||||||
$this->app->bind('globalCache', function ($app) {
|
$this->app->bind('globalCache', function ($app) {
|
||||||
return new CacheManager($app);
|
return new CacheManager($app);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue