Files
api_arrahn/app/Console/Commands/MigrationOnePercent.php
T
2023-12-12 10:19:38 +08:00

49 lines
1013 B
PHP

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
class MigrationOnePercent extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'onepercent:migrate';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Migration of One Percent';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$rollback = Artisan::call('migrate:rollback');
$migrate = Artisan::call('migrate');
$seeder = Artisan::call('db:seed',[
'--class' => 'KadarUpahSeeder',
]);
$this->info('The command was successfully generated!');
}
}