Skip to content

Commit

Permalink
Add scheduled commands to reset db with fresh data.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrevalentin committed Jan 31, 2025
1 parent 51055c3 commit ca01be5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions routes/console.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;

Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote')->hourly();
// Daily reset of demo database
Artisan::command('migrate:fresh', function () {})
->purpose('Fresh db migration to reset demo database')->dailyAt('00:00');
Artisan::command('db:seed', function () {})
->purpose('Seeding the reset database with new demo data')->dailyAt('00:00');

0 comments on commit ca01be5

Please sign in to comment.