mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 14:34:04 +00:00
Add conditional loading for Laravel version 8 and up
The schema dump functionality is not available in laravel version 7 or older
This commit is contained in:
parent
b0dfe338c7
commit
838a257fb3
2 changed files with 14 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ namespace Stancl\Tenancy;
|
|||
|
||||
use Illuminate\Cache\CacheManager;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Str;
|
||||
use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper;
|
||||
use Stancl\Tenancy\Contracts\Domain;
|
||||
use Stancl\Tenancy\Contracts\Tenant;
|
||||
|
|
@ -86,12 +87,14 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
Commands\Seed::class,
|
||||
Commands\Install::class,
|
||||
Commands\Migrate::class,
|
||||
Commands\Rollback::class,
|
||||
Commands\TenantDump::class,
|
||||
Commands\TenantList::class,
|
||||
Commands\MigrateFresh::class,
|
||||
]);
|
||||
|
||||
if ((int) Str::before($this->app->version(), '.') >= 8) {
|
||||
$this->commands([Commands\TenantDump::class]);
|
||||
}
|
||||
|
||||
$this->publishes([
|
||||
__DIR__ . '/../assets/config.php' => config_path('tenancy.php'),
|
||||
], 'config');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue