-
Notifications
You must be signed in to change notification settings - Fork 104
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
Type Hints error: ->addVisitThatExpiresAt( Carbon::now()->addHours(2) ); #10
Comments
Hi selfpaidinc, First I want to thank you for reporting this issue. I did a little research and found out why you are getting this error. I was type hinting a parameter of the function fromCamelCaseToDashes: Source: https://stackoverflow.com/questions/5724677/php-type-hinting-to-primitive-values I will fix it and release a new version. It would be great if you could post a comment when the new version fixed it for you, so I can close this issue. |
Thanks very much for the quick reply I will be sure to comment when it's fixed. Also, any plans on allowing to order model items by view count? |
I released v0.1.5. So a Could you create another "issue" where you describe this missing feature. Because it has nothing to do with this "issue". |
Ran update, issue resolved! Thanks for the super fast response. |
Sorry, must not have looked into this completely. Below my page content there is another exception. (1/1) InvalidArgumentExceptionUnknown setter 'date'in Carbon.php (line 758) |
Could you tell me which Laravel version you are using? and on which version of PHP you are running the application. It might be possible that it is not compatible. It seems that other people who are using HHVM, that they are getting this error too even when they are not using this package. |
I'm using Laravel 5.4 and HHVM |
Are you caching the model where you are calling the ->addVisitThatExpiresAt() function on? |
I'm still developing so not caching anything yet. |
I don't think this has anything to do with Laravel Page Visits Counter. Can you maybe post a screenshot of the full error on the webpage and (if it's there) the error inside the |
When I comment out $track->addVisitThatExpiresAt(Carbon::now()->addHours(3)); the error goes away.
|
I'm sorry but I can't fix this. It has something to do with HHVM. I think when you upload your application to a real web server (like a droplet of DigitalOcean) it will work. It seems that HHVM compiles php code differently than Apache or nginx. Try it again by running the application with |
When trying to use addVisitThatExpiresAt I get an exception error.
The text was updated successfully, but these errors were encountered: