Files
panel-pelican-dev/app/Console/Commands/Overrides/UpCommand.php

27 lines
571 B
PHP
Raw Normal View History

<?php
2024-03-12 22:39:16 -04:00
namespace App\Console\Commands\Overrides;
use App\Traits\Commands\RequiresDatabaseMigrations;
use Illuminate\Foundation\Console\UpCommand as BaseUpCommand;
class UpCommand extends BaseUpCommand
{
use RequiresDatabaseMigrations;
/**
2021-01-23 14:12:15 -08:00
* Block someone from running this up command if they have not completed
* the migration process.
*/
public function handle(): int
{
2021-01-23 12:33:34 -08:00
if (!$this->hasCompletedMigrations()) {
$this->showMigrationWarning();
return 1;
}
return parent::handle();
}
}