49 lines
1013 B
PHP
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!');
|
|
}
|
|
} |