1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Console command for demo mode

This commit is contained in:
David Bomba 2020-06-29 08:02:56 +10:00
parent 37a89cdbb4
commit 4fd51b958f

View File

@ -0,0 +1,46 @@
<?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);
Artisan::call('migrate:fresh');
Artisan::call('db:seed');
Artisan::call('db:seed --class=RandomDataSeeder');
}
}