Skip to content

Commit ca01be5

Browse files
committed
Add scheduled commands to reset db with fresh data.
1 parent 51055c3 commit ca01be5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

routes/console.php

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

3-
use Illuminate\Foundation\Inspiring;
43
use Illuminate\Support\Facades\Artisan;
54

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

0 commit comments

Comments
 (0)