Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Console/Commands/Overrides/SeedCommand.php
7460 views
1
<?php
2
3
namespace Pterodactyl\Console\Commands\Overrides;
4
5
use Pterodactyl\Console\RequiresDatabaseMigrations;
6
use Illuminate\Database\Console\Seeds\SeedCommand as BaseSeedCommand;
7
8
class SeedCommand extends BaseSeedCommand
9
{
10
use RequiresDatabaseMigrations;
11
12
/**
13
* Block someone from running this seed command if they have not completed
14
* the migration process.
15
*/
16
public function handle(): int
17
{
18
if (!$this->hasCompletedMigrations()) {
19
$this->showMigrationWarning();
20
21
return 1;
22
}
23
24
return parent::handle();
25
}
26
}
27
28