dev-master
9999999-devTemporary Folder Manager For Laravel 4
MIT
The Requires
- php >=5.3.0
- illuminate/support 4.1.*
by Plateau Creations
laravel file temporary temp folder
Wallogit.com
2017 © Pedro Peláez
Temporary Folder Manager For Laravel 4
Mirage is a laravel 4 package for creating temporary folder during an application request, which can be useful in plenty of user case., (*1)
Add this into require-dev in your composer.json file:, (*2)
"require-dev" : {
...
"plateau/mirage": "dev-master"
}
Run an update:, (*3)
php composer.phar update
Register the console service provider in app/config/app.php:, (*4)
'providers' => array(
...
'Plateau\Mirage\MirageServiceProvider',
);
Register the facade :, (*5)
'Mirage' => 'Plateau\Mirage\MirageFacade'
By default Mirage will create the temporary folders in /app/storage/temp , but feel free to override the config by publishing it :, (*6)
php artisan config:publish plateau/mirage
To request a folder :, (*7)
$temporaryFolder = Mirage::request();
Mirage will then generate a 32 characters random string and will schedule an event to delete it at then end of the Laravel application's lifecycle, so it we not be available upon next request., (*8)
If you ever need to clean the temporary folder :, (*9)
Mirage::clean();
Happy Coding!, (*10)
Temporary Folder Manager For Laravel 4
MIT
laravel file temporary temp folder