mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 20:47:33 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			585 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			585 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php namespace App\Console\Commands;
 | 
						|
 | 
						|
 | 
						|
use Utils;
 | 
						|
use Illuminate\Console\Command;
 | 
						|
 | 
						|
/**
 | 
						|
 * 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');
 | 
						|
    }
 | 
						|
} |