mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-18 21:34:37 -04:00
36 lines
587 B
PHP
36 lines
587 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Illuminate\Console\Command;
|
|
use Utils;
|
|
|
|
/**
|
|
* Class ResetData.
|
|
*/
|
|
class ResetData extends Command
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $name = 'ninja:reset-data';
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $description = 'Reset data';
|
|
|
|
public function fire()
|
|
{
|
|
$this->info(date('Y-m-d') . ' Running ResetData...');
|
|
|
|
if (! Utils::isNinjaDev()) {
|
|
return;
|
|
}
|
|
|
|
Artisan::call('migrate:reset');
|
|
Artisan::call('migrate');
|
|
Artisan::call('db:seed');
|
|
}
|
|
}
|