Skip to content

Commit 94d4741

Browse files
Add scheduled commands to reset db with fresh data (#222)
1 parent 51055c3 commit 94d4741

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

routes/console.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?php
22

3-
use Illuminate\Foundation\Inspiring;
4-
use Illuminate\Support\Facades\Artisan;
3+
use Illuminate\Support\Facades\Schedule;
54

6-
Artisan::command('inspire', function () {
7-
$this->comment(Inspiring::quote());
8-
})->purpose('Display an inspiring quote')->hourly();
5+
// Reset demo environment daily at midnight
6+
Schedule::command('migrate:fresh')->dailyAt('00:00');
7+
Schedule::command('db:seed')->dailyAt('00:00');

0 commit comments

Comments
 (0)