Skip to content

Commit

Permalink
Merge pull request #4 from pxlrbt/fix/stancl-tenancy
Browse files Browse the repository at this point in the history
fix stancl tenancy command registration
  • Loading branch information
pxlrbt authored Oct 17, 2024
2 parents f6fd710 + a96f910 commit 55de842
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/DatabaseStateServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace pxlrbt\LaravelDatabaseState;

use App\Console\Commands\SeedDatabaseStateCommand;
use Illuminate\Console\Events\CommandFinished;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Event;
Expand All @@ -26,7 +25,7 @@ public function configurePackage(Package $package): void
Commands\SeedDatabaseStateCommand::class,
]);

if (class_exists('\Stancl\Tenancy\Concerns\HasTenantOptions')) {
if (trait_exists('\Stancl\Tenancy\Concerns\HasTenantOptions')) {
$package->hasCommands([
Commands\SeedTenantsDatabaseStateCommand::class,
]);
Expand All @@ -45,7 +44,6 @@ public function packageBooted()
);
}


public function runDatabaseStateSeeder(CommandFinished $event): void
{
if ($event->exitCode !== 0) {
Expand Down

0 comments on commit 55de842

Please sign in to comment.