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

User Stats Bundle Laravel Package

fluffy-factory/user-stats-bundle

A Symfony bundle for collecting and presenting user statistics, with configurable metrics and storage integration for dashboards and admin panels. It plugs into existing user providers to help monitor activity, growth, and engagement without custom reporting plumbing.

View on GitHub
Deep Wiki
Context7

Getting Started

Start by confirming what the package actually contains, since 1.3.4.1 is a small point release on top of an existing baseline:

  1. composer require <vendor>/<package> (check the README for the exact constraint — see the versioning note below before pinning).
  2. Publish and review config: php artisan vendor:publish --provider="<Vendor>\<Package>\ServiceProvider". Read the config file top to bottom; for an archiving package the retention window, target table/disk, and batch size almost always live here.
  3. Run migrations if archiving writes to an archive table or adds columns rather than moving rows to storage.
  4. Inspect the command surface before reading source: php artisan list | grep -i archive then php artisan <command> --help. The 1.3.4.1 change to "the command to archive" is where the meaningful behaviour lives, and --help is the fastest way to see if options were added, renamed, or defaulted differently.

First use case: run the archive command against a single known record in a local database (not a full table), then verify three things — the source row is gone or flagged, the archive destination contains it, and nothing else changed. Then open the admin detail page for an archived record and confirm the new user link renders and resolves. Doing both in one pass exercises exactly what this release touched.

Implementation Patterns

Scheduling the archive command. Register it in routes/console.php (Laravel 11+) or the console kernel rather than wiring it into a controller. Give it withoutOverlapping() and a sensible onOneServer() if you run multiple app nodes — an archiving job that runs twice concurrently is how you get double-archived or half-archived rows.

Schedule::command('model:archive')->dailyAt('02:00')->withoutOverlapping();

Treat the command as untrusted in production. Because 1.3.4.1 only says the command was "improved," do the first production run with whatever dry-run or verbose flag exists, or against a replica. Compare counts: SELECT COUNT(*) on the source before and after, and the same on the archive target. A one-line changelog entry on a destructive command is not a spec.

Wrap it for per-tenant or per-model scoping. If you need to archive one tenant, one model, or one date range at a time, don't fork the command — build a thin Artisan wrapper or a queued job that calls the package's service/action class, and keep the package command for the global sweep. This keeps you on the upgrade path.

Admin user link. The EasyAdmin link is a UI convenience, so implement it as configuration, not code: point the field/link at a route name and let the package render it. Check whether the release expects a route name, a column, or a relation — if the package ships a config key for it, use that rather than overriding templates, since template overrides are the first thing to break on the next release.

Testing. Assert command behaviour, not output text:

$this->artisan('model:archive')->assertExitCode(0);
$this->assertDatabaseMissing('posts', ['id' => $post->id]);
$this->assertDatabaseHas('archived_posts', ['id' => $post->id]);

For the admin link, a feature test hitting the detail page and asserting assertSee(route('admin.users.show', $post->user_id)) catches both the rendering and the wiring cheaply.

Gotchas and Tips

  • The version string is four-part (1.3.4.1), not semver. Composer will treat it as a normalised version, but tooling and humans may not. Pin explicitly ("1.3.4.1") or use ~1.3.4 rather than ^1.3, and confirm the tag name on the repo matches what Packagist reports.
  • "Improve the command to archive" is a behaviour change in a patch release. Diff the command class between 1.3.4 and 1.3.4.1 (git diff 1.3.4 1.3.4.1 -- src/Console) before upgrading anything that runs on a schedule. Look specifically for changed defaults: batch size, retention cutoff, whether it now hard-deletes, whether it now cascades to relations, and whether chunking switched to chunkById (the latter is a fix; the former can silently archive more than you intended).
  • Watch the retention cut-off. If the improvement altered date-boundary logic (inclusive vs exclusive), a nightly job can start archiving one extra day of data per run. Verify with a fixed fixture date rather than "looks about right."
  • The EasyAdmin user link will break on null users. Soft-deleted or hard-deleted users are the common case for archived records — archiving is exactly what you do to old rows whose authors have since gone. Test the page with user_id pointing at a deleted user; if the link renders unconditionally you'll get a 500 on a page that previously worked.
  • Authorization is not implied by the link existing. The link may render for admins who lack access to the user resource, producing a dead-end 403. Check with a low-privilege admin account, and hide the field via the admin config if needed rather than patching the package.
  • Debugging archive runs: capture --verbose output to a log, and run inside a transaction where possible so a partial failure doesn't leave rows in neither table. On large tables expect memory and timeout pressure — confirm the command chunks rather than ->get()s, and raise --time/max_execution_time only after you've confirmed it does.
  • Config caching: php artisan config:cache after any config edit; a stale cached config is the usual reason "the new setting did nothing."
  • Extension points to prefer: command options and the package's service/action class, published config, and events (listen for an archived event to trigger cache invalidation or search-index updates). Avoid overriding the admin views or subclassing the command unless there's no alternative — both are the most likely casualties of 1.3.5.
  • Keep an upgrade note. With changelogs this terse, record what you verified for each bump (counts before/after, dry-run output, admin page smoke test). The next release note will be equally short.
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.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle