Package Data | |
---|---|
Maintainer Username: | Ertenal |
Maintainer Contact: | daan@beeldvoerders.nl (Daan Aikema) |
Package Create Date: | 2017-03-20 |
Package Last Update: | 2017-10-18 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-17 03:02:48 |
Package Statistics | |
---|---|
Total Downloads: | 329 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 1 |
Total Open Issues: | 0 |
This Laravel package lets you restore your application to a previous declared state. This is helpfull for demo applications where you set your users free but want to reset the state, for example, every midnight.
First require it in composer:
composer require beeldvoerders/laravel-reset
Next, add the ResetServiceProvider class to your config/app.php providers array:
Beeldvoerders\Reset\ResetServiceProvider::class
You can specify which directories has to reset in the reset config file. By default this is the storage/app directory. If you want to change these config settings, publish them first to your application:
php artisan vendor:publish --provider="Beeldvoerders\Reset\ResetServiceProvider"
If you set the config right, you have to create the back-up on which the restore is based:
php artisan reset:create
Once the back-up is created, test it by making some changes to your application and reset the state:
php artisan reset
If you want to reset your application once every midnight, then you should add the Reset command to the Laravel scheduler:
$schedule->command('reset')
->daily();
If you discover a bug, wants to participate or just have a question, feel free to contact me at daan@beeldvoerders.nl.
This package is open-sourced software licensed under the MIT license.