boolfalse / clearcaches
Package for recreating Laravel all caches, and for dropping all DB tables, for flushing all sessions.
Requires
None
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Package for clearing/recreating all Laravel caches, for dropping all DB tables, and flushing all Laravel sessions. It's a package created for easy development. This package is my first created package. So I will glad to hear any advices and suggestions.
Package Installation:
Require this package with composer. It is recommended to only require the package for development.
composer require boolfalse/clearcaches --dev
But I prefer to use this in production level too (sometimes I need this). So you can just install with this:
composer require boolfalse/clearcaches
For Laravel 5.4 and lower versions need to add service provider in config/app.php (or in config.php) to "providers" list array:
Boolfalse\ClearCaches\ClearCachesServiceProvider::class,
For Laravel 5.5 and higher Package have Auto-Discovery functionality, so doesn't require you to manually add the ServiceProvider.
Usage:
Clear all Laravel Caches and Dump Autoload:
php artisan clearcaches
With CLI option 'dump' You can prevent Autoload Dumping:
php artisan --dump='no'
Drop all tables from DB:
php artisan droptables
Flush all Laravel sessions:
php artisan flushsessions
- For index page: your-domain/dev/clearcaches-check
- For clearing and recreating caches: your-domain/dev/clearcaches
- For dropping all DB tables: your-domain/dev/droptables
Update the package:
This command will update this specific package:
composer update boolfalse/clearcaches
Or
composer update boolfalse/clearcaches --lock
For updating all existing packages, just run:
composer update
Remove the package:
NOTE: For Laravel 5.4 and lower versions (for avoid terminal errors) before running command You need to firstly manually remove
Boolfalse\ClearCaches\ClearCachesServiceProvider::class,
service provider from "providers" list array in config/app.php (or in config.php).
composer remove boolfalse/clearcaches
And after that open '/dev/clearcaches' pages for clearing providers config caches; or just run this commands:
php artisan cache:clear php artisan config:cache
Publishing the package index view:
Available for ^1.0 version
php artisan vendor:publish --provider="Boolfalse\ClearCaches\ClearCachesServiceProvider"