tighten / nova-google-analytics

Google Analytics integration with Laravel Nova
MIT License
165 stars 30 forks source link

Fix undefined function array_get() #13

Closed abr4xas closed 5 years ago

abr4xas commented 5 years ago

I'm using laravel 6 and I have this error:

Call to undefined function Tightenco\NovaGoogleAnalytics\array_get() 
{"userId":1,"exception":"
[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): 
Call to undefined function Tightenco\\NovaGoogleAnalytics\\array_get() at 
/application/vendor/tightenco/nova-google-analytics/src/VisitorsMetric.php:29)

and:

Call to undefined function Tightenco\NovaGoogleAnalytics\array_get() 
{"userId":1,"exception":"
[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): 
Call to undefined function Tightenco\\NovaGoogleAnalytics\\array_get() at 
/application/vendor/tightenco/nova-google-analytics/src/PageViewsMetric.php:29)
mattstauffer commented 5 years ago

Changing it this way will break it for non-Laravel-6 apps, though, right?

Could we switch to use the facade instead? Arr::get() or whatever?

abr4xas commented 5 years ago

Hey Matt, that's right. I'm making some changes... I'll ping you later ;)