DISCLAIMER: I wrote this package for Larahack 2019 in an afternoon. It was a bit of fun. I don't actually suggest you use it anywhere. I take no responsibility for anything that happens to your website if you do!
I say we take off and nuke the entire site from orbit... it's the only way to be sure.
This package utilises the migrate:fresh
command, therefore Laravel 5.5 is the minimum supported version.
The package is installed via composer:
composer require mikkyx/nuke
Once you've done that, you should add the command class to app/Console/Kernel.php
:
protected $commands = [
...
\MikkyX\Nuke\Commands\Nuke::class,
]
The command is run as follows:
php artisan nuke
Once confirmed, the following actions will be taken:
migrate:fresh
will be executed to drop your database and rerun migrationsdb:seed
will be executed to re-run any default database seederscache:clear
will be executed to clear out any cached views etc.config:clear
will be executed to clear out the config cache- All files (except
.gitignore
) in your configuredpublic
disk will be deleted key:generate
will be executed to generate a new application key
You will not be able to run this command if your environment is set to live
, master
or production
.
- Written by Michael Price for Larahack 2019 on the theme "We can rebuild"
GPL v3. Please see the License File for more information.