Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Clear all Caches, Drop all DB tables, Flush all Sessions opportunities

Notifications You must be signed in to change notification settings

boolfalse/clearcaches

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

Total Downloads License

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"

History:

v1.1.5: Added 'flushsessions' command.

v1.1.0: Removed view (for publishing), controller, route

v1.0.12: "minimum-stability" changed to "stable" version.
v1.0.11: Added 'clear-compiled' artisan command.
v1.0.6: Added 'dump' option for 'clearcaches' CLI custom artisan command.
v1.0.5: Added custom artisan commands with appropriate signatures ('clearcaches', 'droptables').
v1.0.4: Ability to publish package index page and have that as 'resources\views\clearcaches\cc.blade.php' file
v1.0.2: Added embed buttons from https://poser.pugx.org/ for README.md

About

Clear all Caches, Drop all DB tables, Flush all Sessions opportunities

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages