Created
December 24, 2018 11:12
-
-
Save densityx/7464706b0b6d4f9d4fa84f393647650a to your computer and use it in GitHub Desktop.
Listening global events and performing action for it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Event::listen(CommandStarting::class, function ($event) { | |
if ($event->command === 'migrate:fresh') { | |
Storage::deleteDirectory('/public/clubs'); | |
Storage::deleteDirectory('/public/users'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment