Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove config from provider to make config:cache work #13

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

SPQRBrutus
Copy link
Contributor

When I used php artisan config:cache command all variables was null because you can't read from .env in your provider but only config files. https://laracasts.com/discuss/channels/laravel/configcache-makes-variables-in-env-null

@yaza-putu yaza-putu merged commit 47101fe into yaza-putu:main Nov 10, 2023
1 check passed
@ades4827
Copy link

The problem isn't solved for me.

When I type the artisan shell command "optimize:clear" and then "optimize" (activate caches) the following error appears: "refresh token must be passed in or set as part of setAccessToken".

Looking in the code (vendor/yaza/laravel-google-drive-storage/src/LaravelGoogleDriveStorageServiceProvider.php:34), access to the env is done via the "env('GOOGLE_DRIVE_REFRESH_TOKEN')" function, not the cached config: "config('filesystems.disks.google.refreshToken', env('GOOGLE_DRIVE_REFRESH_TOKEN'));"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants