1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Console/Commands/DemoMode.php
2020-06-29 09:38:37 +10:00

52 lines
1.0 KiB
PHP

<?php
namespace App\Console\Commands;
use Composer\Composer;
use Composer\Factory;
use Composer\IO\NullIO;
use Composer\Installer;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Symfony\Component\Console\Input\ArrayInput;
use Composer\Console\Application;
class DemoMode extends Command
{
protected $name = 'ninja:demo-mode';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ninja:demo-mode';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Setup demo mode';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
set_time_limit(0);
$this->info("Migrating");
Artisan::call('migrate:fresh --force');
$this->info("Seeding");
Artisan::call('db:seed --force');
$this->info("Seeding Random Data");
Artisan::call('db:seed --class=RandomDataSeeder --force');
}
}