Handle demo version of the app (#256)

This commit is contained in:
mchev
2025-01-12 13:56:52 +01:00
committed by GitHub
parent f52b73f517
commit 9bed81fe8f
7 changed files with 115 additions and 23 deletions

View File

@@ -3,13 +3,15 @@
use App\Models\CompanySetting;
use App\Models\RecurringInvoice;
use App\Space\InstallUtils;
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schedule;
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote')->hourly();
// Only run in demo environment
if (config('app.env') === 'demo') {
Schedule::command('reset:app --force')
->daily()
->runInBackground()
->withoutOverlapping();
}
if (InstallUtils::isDbCreated()) {
Schedule::command('check:invoices:status')