Skip to content

Commit a6604fd

Browse files
Merge pull request #90 from FusionPwN/main
Fixed env vars for newer laravel versions
2 parents e920045 + e5d3ca7 commit a6604fd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ class CookiesServiceProvider extends ServiceProvider
111111
// Register all Analytics cookies at once using one single shorthand method:
112112
Cookies::analytics()
113113
->google(
114-
id: env('GOOGLE_ANALYTICS_ID')
115-
anonymizeIp: env('GOOGLE_ANALYTICS_ANONYMIZE_IP')
114+
id: config('cookieconsent.google_analytics.id')
115+
anonymizeIp: config('cookieconsent.google_analytics.anonymize_ip')
116116
);
117117

118118
// Register custom cookies under the pre-existing "optional" category:

src/CookiesManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ protected function makeConsentCookie(): CookieComponent
160160
value: json_encode($this->preferences),
161161
minutes: config('cookieconsent.cookie.duration'),
162162
domain: config('cookieconsent.cookie.domain'),
163-
secure: (env('APP_ENV') == 'local') ? false : true
163+
secure: (config('app.env') == 'local') ? false : true
164164
);
165165
}
166166

0 commit comments

Comments
 (0)