Comments (10)
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.
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.
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.
Yes that is fine. But how can I use orderByViewsCount() with unique views?
from eloquent-viewable.
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.
Well. Guess that solves this issue. When is the estimated release?
from eloquent-viewable.
I hope this evening.
from eloquent-viewable.
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.
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.
See #85
from eloquent-viewable.
Related Issues (20)
- give point to post author on unique post view HOT 1
- how can I get user post view count HOT 1
- how to get total number of views of all posts HOT 1
- Getting Column not found when using ->orderByViews() HOT 10
- Laravel 9 support HOT 6
- `touch` the parent timestamp if the view has been recorded HOT 3
- Error : Cannot record a view for a viewable type HOT 1
- How to add some fields to table views HOT 1
- cannot record new views instance HOT 2
- Is there a way to record a view on cyrildewit / eloquent-viewable with the user_id not just the viewable_id HOT 1
- local.ERROR: Undefined index: lifetime_in_minutes
- Class "Period" not found HOT 2
- How can I check if an auth user or a visitor has already viewed a post? HOT 4
- Laravel 10 Support HOT 2
- PHP 8.2 support HOT 2
- CyrildeWit\EloquentViewable\Views::forViewable(): Argument #1 ($viewable) must be of type HOT 1
- How to extend the package to also count other things HOT 2
- User show the post twice HOT 1
- [Question] Seperate records by type
- Sort OutType Error:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eloquent-viewable.