Giter Club home page Giter Club logo

Comments (10)

cyrildewit avatar cyrildewit commented on May 17, 2024

I'm not able to reproduce this. I cleared my cache using php artisan cache:clear and resetted my browser data in chrome using: at Application tab under Clear storage -> clear site data.

Did you do something different?

from eloquent-viewable.

mohamedshuaau avatar mohamedshuaau commented on May 17, 2024

Sorry yes. I had a custom func written because my live server was running on a load balancer and fideloper proxy was not working for some reason. Basically it overrides the $request->ip() function. That is why when I am on my local development, it returns null. Sorry about that. You can close the issue.

One thing that i did not get was, how do I add unique views? And how do i get popular posts where unique id?

from eloquent-viewable.

cyrildewit avatar cyrildewit commented on May 17, 2024

One thing that i did not get was, how do I add unique views? And how do i get popular posts where unique id?

Every time when the $model->addView() method is triggered, it stores a view in the database. This view contains the viewer's unique id or his ip address if he's in igcognito mode. You can call the getUniqueViews method to get the total number of unique views.

from eloquent-viewable.

mohamedshuaau avatar mohamedshuaau commented on May 17, 2024

Yes that is fine. But how can I use orderByViewsCount() with unique views?

from eloquent-viewable.

cyrildewit avatar cyrildewit commented on May 17, 2024

Ahh, I misunderstood. It's currently not possible. Lol, I never thought of that. I'm working on it. There will be a new release soon.

from eloquent-viewable.

mohamedshuaau avatar mohamedshuaau commented on May 17, 2024

Well. Guess that solves this issue. When is the estimated release?

from eloquent-viewable.

cyrildewit avatar cyrildewit commented on May 17, 2024

I hope this evening.

from eloquent-viewable.

mohamedshuaau avatar mohamedshuaau commented on May 17, 2024

Not sure what time that would be for me but I will surely keep hitting that reload button for the new update. By the way, awesome package. Just this feature was what I needed. Keep up the awesome work :)

from eloquent-viewable.

cyrildewit avatar cyrildewit commented on May 17, 2024

Thank you for the kind words.

I'm not going to make it today. I'm also not really experienced with sql, so it's going to take a while before I found the right query that I can use. I'm busy this week, but I'll try to make it as fast as possible.

from eloquent-viewable.

cyrildewit avatar cyrildewit commented on May 17, 2024

See #85

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.