mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Console command for demo mode
This commit is contained in:
parent
37a89cdbb4
commit
4fd51b958f
46
app/Console/Commands/DemoMode.php
Normal file
46
app/Console/Commands/DemoMode.php
Normal 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');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user