#laravel, #storage, #heroku, #git
Please provide a valid cache path
rm -rf public/storage # // Optional: Undo the effect of: $ php artisan storage:link; This links to storage/app/public and can be deleted.
mkdir -p bootstrap/cache storage/framework/{sessions,views,cache}
sudo touch storage/framework/cache/data/NULL # // Force git to include this folder by adding an empty file. I can't figure out why git would not register properly the storage directory.
sudo touch storage/framework/views/NULL
sudo touch storage/framework/sessions/NULL
sudo chown -R 48:48 bootstrap storage # Optional
sudo chmod -R 777 bootstrap storage # Optional
git add -A
git status # // Check output to verify the storage folder is present
git commit -m "Lorem ipsum dolor sit amet"
git push heroku master
After many failed attempts, I noticed that Laravel's storage folder would not be included in the heroku commits.
- The folder was not marked in any .gitignore files
- The folder was not marked in the .slugignore file By adding the empty files in every indicated directory I make sure that Git will include the storage folder in the next commit. The output from the command: git push heroku master; should now include the storage directory and its dummy files. Done!