Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravisit Laravel Package

coderflexx/laravisit

Laravisit is a lightweight Laravel package for tracking website visits without third-party analytics. Log page views, unique visitors, referrers, browsers, devices, and countries, then query Visit models for popular pages and simple reports. Easy middleware setup and customizable tracking.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Scope of this release. v2.2.0 is a compatibility release, not a feature release. The functional surface of the package (a polymorphic visit-counter trait for Eloquent models) is unchanged; the delta is a widened support matrix — Laravel 13.x and PHP 8.4 — plus CI coverage for Laravel 10/11/12/13 and PHP 8.1–8.4. Since no prior assessment exists, this document serves as the baseline and treats v2.2.0 as the entry point.

Architecture fit. The package is a narrow, additive capability: a HasVisits trait plus a visits migration and a Visit model, used to record and count views of an Eloquent model (IP, user agent, timestamps) with optional caching. It attaches at the model layer rather than the HTTP layer, so there is no middleware ordering, route coupling, or response-lifecycle involvement. That makes it architecturally cheap: it does not constrain our application structure, and it is fully removable by dropping the trait and the table. Fit is good for read-heavy content models where "views/popularity" is a product requirement (listings, articles, dashboards).

Integration feasibility. Straightforward. Two dependencies: illuminate/contracts (framework, now ^13.0 included) and coderflexx/laravel-presenter ^2.2. The latter is the one non-obvious element — it is a second, smaller package from the same author, pinned as a hard requirement and bumped specifically "for L13 compat." That means our adoption of laravisit inherits a transitive dependency we do not otherwise need and cannot easily fork around. Installation is a Composer require, a published migration, and a published config; expected effort for a first vertical slice is on the order of half a day for an experienced Laravel engineer, dominated by schema and backfill decisions rather than by the package itself.

Technical risk. Rated low-to-moderate.

  • Low: breaking-change risk from this release. No API removals or behavior changes are described; the dependency changes are forward-compatibility. Existing v2.1.x consumers should upgrade without code changes, subject to Composer resolution of laravel-presenter ^2.2.
  • Moderate: single-maintainer, small-audience package with a transitive dependency from the same maintainer. Both packages must be abandoned or go unmaintained together. This is the material risk, not the version bump.
  • Moderate: the cache layer. Visit counting is typically aggregated via the package's caching path; incorrect cache TTL or cache-store assumptions (tagging support, shared cache across environments) can produce silently wrong counts, which is a correctness issue that surfaces in product metrics rather than in exceptions.
  • Low: data volume and write amplification — each tracked view is an insert. This is a schema and retention decision, not a package defect.

Key questions.

  1. Is Laravel 13 generally available, or is this pre-release support? If pre-release, we should pin v2.1.x for production and treat v2.2.0 as a staging-only upgrade until L13 ships — this affects our upgrade calendar, not our adoption decision.
  2. What is the maintainer's stated support window and bus factor? Is there a funded succession, co-maintainer, or org backing?
  3. Do we need per-visitor counting, unique-visitor counting, or bot filtering? The package records raw visits; any deduplication or bot exclusion is our responsibility and changes the schema/index design.
  4. What is our retention policy for the visits table? Rows grow monotonically; do we keep raw events, roll up nightly, or cap at N days?
  5. Does our cache store support the tagging behavior the package assumes, and is the cache shared across web/queue/console contexts?

Integration Approach

Stack fit. Good fit for a conventional Laravel monolith on Eloquent with MySQL/Postgres and Redis. Poor fit — or at least a re-architecture — if we are event-sourced, if the database is multi-tenant with strict per-tenant isolation (the migration needs a tenant column and a composite index), or if we already operate a product-analytics pipeline (in which case we would be duplicating a warehouse capability in the OLTP database).

Migration path. There is no migration from a prior package; this is greenfield adoption. The migration is the package's own published visits migration, which we should treat as a template rather than as-is: review indexes (visitable_type/visitable_id composite, created_at), decide on retention, and add tenant or site scoping if applicable. For an existing install on v2.1.x, the path to v2.2.0 is a Composer update; run it in a branch, verify laravel-presenter resolves cleanly, and confirm visit counts before and after on a seeded dataset.

Compatibility. Explicitly stated: Laravel 10/11/12/13, PHP 8.1–8.4. This is a genuinely broad window and is the strongest argument for adoption now — it means the package will not be the constraint on our next framework upgrade. Caveats to verify rather than assume: the CI matrix proves the suite runs, not that every combination is exercised in production; and Laravel 10 is near or past security support depending on release timing, so "supported" here should be read as "installs and passes tests," not "vendor-maintained for our lifecycle."

Sequencing.

  1. Weeks 1: Spike in a non-production branch. Install, publish migration and config, apply the trait to one low-traffic model (e.g., an article or listing). Verify counts, caching, and IP handling behind our load balancer.
  2. Week 2: Schema review with data — indexes, retention job, tenant scoping if needed. Decide bot/dedup policy. This is the step most likely to consume effort.
  3. Week 3: Instrument one real, non-critical surface end-to-end (write path plus a read/aggregate path) and confirm the numbers match an independent source (access logs) within an acceptable tolerance.
  4. Week 4+: Roll out model-by-model. Nothing depends on the package in the other direction, so rollback is deleting the trait call and dropping the table.

Do not sequence this behind a Laravel 13 upgrade. The package is compatible across our current and target framework versions, so it can land independently — which is precisely the value of this release.

Operational Impact

Maintenance. Low ongoing code maintenance, moderate dependency maintenance. The package is small and stable; the recurring work is keeping laravel-presenter and illuminate/contracts constraints aligned at each Laravel upgrade. This release is itself an example: an L13 upgrade forced a coordinated bump of a second package. Budget a small amount of time at every framework upgrade to confirm both resolve. The larger maintenance line item is data: the visits table is append-only and will become one of the faster-growing tables in the schema.

Support. Primary risk is the single-maintainer model. There is no commercial support tier, no SLA, and no obvious second contributor. Mitigation is cheap and should be done at adoption, not after an incident: (a) fork to our org namespace and keep it buildable, (b) commit the published migration and config into our repo so the package is not load-bearing for schema, (c) keep our usage confined to a thin internal VisitTracker service so the package can be swapped without touching call sites. With those three in place, an abandonment event is a routine substitution rather than a project.

Scaling. Two axes matter.

  • Write throughput: one insert per tracked view. At high-traffic surfaces this becomes hot-path write load and index contention. Mitigate with queued/batched writes or by tracking only on curated surfaces (detail pages, not listing pages).
  • Read cost: aggregate counts should be served from cache, not from COUNT(*) over a growing table. Confirm the package's cache path is configured with a sensible TTL and that invalidation semantics are acceptable for the product (stale counts are usually fine; they are not fine for billing or ranking with tight tolerances).

Also confirm index design before volume arrives — retrofitting an index on a 100M-row visits table is a maintenance-window conversation.

Failure modes.

  1. Silent under- or over-counting via cache misconfiguration or shared cache keys across environments. Detect with periodic reconciliation against access logs or a sampled raw-row count; this is the highest-likelihood failure and the one that erodes product trust in the metric.
  2. Dependency resolution failure at framework upgrade time when laravel-presenter lags. Detect in CI by testing the upgrade branch early.
  3. Bot and internal traffic inflation — no built-in exclusion means recorded views overstate real engagement. Define the policy before the number appears in a stakeholder dashboard.
  4. Table growth / unbounded retention degrading write latency and backup windows. Detect with table-size monitoring and a retention job with an alert on failure.
  5. Abandonment — no new releases against a future Laravel major. Detect by watching for absence of a compatibility release within ~90 days of a Laravel major; the fork in the maintenance section is the response.
  6. Proxy/IP handling errors behind load balancers or CDNs, producing a single IP for all traffic. Low impact (IP is informational) but worth a one-time check on trusted-proxy configuration.

Ramp-up. Very low for engineers familiar with Eloquent: the mental model is a trait plus a migration plus a cache, learnable in under an hour from the README. The real ramp-up cost is on the analytics consumer side — whoever builds dashboards must understand what a "visit" means here (a raw row, not a session, not a unique user) or the first report will be misread. Budget a short written definition of the metric alongside the code, and confirm the count semantics with the stakeholder before the first dashboard ships.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib