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 cd187f8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions routes/console.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?php

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();
// Reset demo environment daily at midnight
Schedule::command('migrate:fresh')->dailyAt('00:00');
Schedule::command('db:seed')->dailyAt('00:00');

0 comments on commit cd187f8

Please sign in to comment.