cyrildewit/eloquent-viewable
Track and query page views on Eloquent models without external analytics. Record views with optional cooldown, count totals/unique views, filter by date periods, order models by views, and ignore crawlers. Stores each view as a DB record.
Avoid if:
Consider if:
For Executives: "This package lets us track how users engage with our content—like blog posts or product pages—directly in our database, without relying on external tools. It’s lightweight, privacy-friendly, and gives us precise metrics (e.g., ‘views in the last 7 days’) to optimize what we highlight or promote. For example, we could automatically surface the top 5 most-viewed articles on our homepage, or adjust ad placements based on traffic. It’s a cost-effective way to build analytics into our product natively."
For Engineers: *"Eloquent Viewable is a battle-tested Laravel package that adds view tracking to Eloquent models with minimal setup. Key benefits:
View model, add custom visitor data, or ignore bots/crawlers.
Use case: Drop this into your PostController to track views, then use the orderByViews() scope to rank content dynamically. Pair with Laravel’s scheduler to cache metrics for high-traffic pages."*How can I help you explore Laravel packages today?