optimistdigital / laravel-generate-storage-structure
This package generates the Laravel storage folder structure. Useful when mounting an empty directory to replace `storage/` in production or staging environments.
Fund package maintenance!
outl1ne
Installs: 10 510
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 4
Forks: 2
Open Issues: 1
Requires
- php: ^7.3|^8.0|^8.1|^8.2
- symfony/console: ^5.0
- symfony/filesystem: ^5.0
Requires (Dev)
- phpunit/phpunit: ^9.1
README
This package generates the Laravel storage folder structure. Useful when mounting an empty directory to replace storage/
in production or staging environments.
When running a Laravel application with an empty storage directory, you should get an error related with reading/storing files to/from storage
directory like ErrorException file_put_contents(/../storage/..): failed to open stream: No such file or directory
or similar. This can be fixed by manually creating the folder structure as needed, but it's cumbersome task with automated CI/CD flows.
Usage
composer require outl1ne/laravel-generate-storage-structure
Create app/
, framework/
and logs/
directories into the current directory:
generate-storage-structure
Create app/
, framework/
and logs/
directories into /storage
directory:
generate-storage-structure --storage-path=/storage