2016-12-14 04:32:10 -08:00
|
|
|
<?php
|
|
|
|
|
2016-12-19 11:04:28 -08:00
|
|
|
use App\Models\Setting;
|
2016-12-14 04:32:10 -08:00
|
|
|
use Illuminate\Foundation\Inspiring;
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Console Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| This file is where you may define all of your Closure based console
|
|
|
|
| commands. Each Closure is bound to a command instance allowing a
|
|
|
|
| simple approach to interacting with each command's IO methods.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
Artisan::command('inspire', function () {
|
|
|
|
$this->comment(Inspiring::quote());
|
|
|
|
})->describe('Display an inspiring quote');
|
2016-12-19 11:04:28 -08:00
|
|
|
|
|
|
|
Artisan::command('snipeit:travisci-install', function () {
|
|
|
|
if(!Setting::setupCompleted()) {
|
|
|
|
$settings = new Setting;
|
|
|
|
$settings->site_name = 'test-ci';
|
|
|
|
$settings->alert_email = 'test@example.com';
|
|
|
|
$settings->alerts_enabled = 1;
|
|
|
|
$settings->brand = 1;
|
|
|
|
$settings->locale = 'en';
|
|
|
|
$settings->default_currency = 'USD';
|
|
|
|
$settings->user_id = 1;
|
|
|
|
$settings->email_domain = 'example.com';
|
|
|
|
$settings->email_format = 'filastname';
|
|
|
|
$settings->save();
|
|
|
|
} else {
|
|
|
|
$this->comment('Setup already ran');
|
|
|
|
}
|
|
|
|
})->describe('Travis-cli install script for unit tests');
|