I've been reading different ways of doing this, but none of the solutions seem to be working.
At some point in my app, I want to be able to add an .env
editor, and in my .env is a path to my preferred storage location. (e.g /data/dev/storage
)
What is the best way to use the useStoragePath method, but to also call the .env value that is the path? (e.g env('APP_STORAGE')
)
Tried $this->app->useStoragePath(env('APP_STORAGE'));
in AppServiceProvider::register
- no changes
Tried $app->useStoragePath(env('APP_STORAGE'));
in bootstrap/app.php
- can't pull env value
Tried $app->useStoragePath('/my/preferred/path');
in bootstrap/app.php
- this worked, but was not my preferred option.
Any ideas?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community