Giter Club home page Giter Club logo

Comments (12)

selfpaidinc avatar selfpaidinc commented on May 18, 2024 1

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?

from eloquent-viewable.

cyrildewit avatar cyrildewit commented on May 18, 2024 1

I released v0.1.5. So a composer update will install the new version.

Could you create another "issue" where you describe this missing feature. Because it has nothing to do with this "issue".

from eloquent-viewable.

selfpaidinc avatar selfpaidinc commented on May 18, 2024 1

Ran update, issue resolved! Thanks for the super fast response.

from eloquent-viewable.

cyrildewit avatar cyrildewit commented on May 18, 2024

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: (string $value). But I didn't knew that type hints cannot be used with types such as int or string.

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.

from eloquent-viewable.

selfpaidinc avatar selfpaidinc commented on May 18, 2024

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)
at Carbon->__set('date', '2017-07-14 16:57:26.000000')
at DateTime->__sleep()
at serialize(array('_token' => 'ftaE4vKPtBORLyXhFH5HGmGJS6qtifjuXRjgBcBI', '_previous' => array('url' => 'http://www.**********.com/*****/****************'), '_flash' => array('old' => array(), 'new' => array()), 'page-visits-counter' =>array('history' => array('track' => array(array('visitable_id' => 3, 'expires_at' => object(Carbon)))))))in Store.php (line 129)
at Store->save()in StartSession.php (line 88)
at StartSession->terminate(object(Request), object(Response))in Kernel.php (line 218)
at Kernel->terminateMiddleware(object(Request), object(Response))in Kernel.php (line 189)
at Kernel->terminate(object(Request), object(Response))in index.php (line 58)

from eloquent-viewable.

cyrildewit avatar cyrildewit commented on May 18, 2024

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.

from eloquent-viewable.

selfpaidinc avatar selfpaidinc commented on May 18, 2024

I'm using Laravel 5.4 and HHVM

from eloquent-viewable.

cyrildewit avatar cyrildewit commented on May 18, 2024

Are you caching the model where you are calling the ->addVisitThatExpiresAt() function on?

facebook/hhvm#5893 (comment)

from eloquent-viewable.

selfpaidinc avatar selfpaidinc commented on May 18, 2024

I'm still developing so not caching anything yet.

from eloquent-viewable.

cyrildewit avatar cyrildewit commented on May 18, 2024

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 laravel.log file that you can find inside the storage directory.

from eloquent-viewable.

selfpaidinc avatar selfpaidinc commented on May 18, 2024

When I comment out $track->addVisitThatExpiresAt(Carbon::now()->addHours(3)); the error goes away.

image

[2017-07-14 16:09:28] local.ERROR: exception 'InvalidArgumentException' with message 'Unknown setter 'date'' in /var/www/clients/client1/web1/web/laravel/vendor/nesbot/carbon/src/Carbon/Carbon.php:758
Stack trace:
#0 (): Carbon\Carbon->__set()
#1 (): DateTime->__sleep()
#2 /var/www/clients/client1/web1/web/laravel/vendor/laravel/framework/src/Illuminate/Session/Store.php(129): serialize()
#3 /var/www/clients/client1/web1/web/laravel/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(88): Illuminate\Session\Store->save()
#4 /var/www/clients/client1/web1/web/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(218): Illuminate\Session\Middleware\StartSession->terminate()
#5 /var/www/clients/client1/web1/web/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(189): Illuminate\Foundation\Http\Kernel->terminateMiddleware()
#6 /var/www/clients/client1/web1/web/laravel/public/index.php(58): Illuminate\Foundation\Http\Kernel->terminate()
#7 {main}  

from eloquent-viewable.

cyrildewit avatar cyrildewit commented on May 18, 2024

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 php artisan serve. This will use the original php.

from eloquent-viewable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.