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

Pulse Database Table Sizes Laravel Package

schmeits/pulse-database-table-sizes

A Laravel Pulse card that displays database table sizes on your dashboard, helping you spot large tables and monitor storage growth at a glance. Simple to install and useful for keeping an eye on database bloat.

View on GitHub
Deep Wiki
Context7

Getting Started

  1. Install the package via Composer and publish its config file:
    composer require <vendor>/<package>
    php artisan vendor:publish --tag=<package>-config
    
  2. Open config/<package>.php and review the precision key added in 1.7.2. This controls how many decimal places are shown when table sizes are formatted (e.g. 1.23 MB vs 1.2345 MB). Set it to match your team’s reporting style.
  3. Run the package’s primary command or visit its dashboard route to see a list of database tables and their sizes. A good first use case is checking for unexpectedly large tables in local or staging before a deployment.

Implementation Patterns

  • Scheduled size reports – Wrap the package’s table-size query in an Artisan command and schedule it weekly. Use the new precision config to keep reports consistent across environments.
  • Admin dashboard widget – Call the package’s service or facade from a controller and pass the formatted sizes to a Blade view. The precision setting applies automatically, so you don’t need to format numbers in the view.
  • Growth monitoring – Persist table sizes to a log or metrics table on each run, then compare deltas over time. The configurable precision helps avoid noisy diffs caused by overly precise formatting.
  • Environment-specific config – Override precision in config/<package>.php per environment (e.g. fewer decimals in production dashboards, more in local debugging).
  • Integration with existing tooling – If you already have a health-check or ops dashboard, expose the package’s data through a small JSON endpoint rather than duplicating queries.

Gotchas and Tips

  • Config caching – After changing precision, run php artisan config:clear (or config:cache in production). Laravel will otherwise keep the old value.
  • Display-only precision – The 1.7.2 setting affects formatting only; it does not change the underlying byte counts returned by the database. Do not rely on it for calculations.
  • Database permissions – The package needs access to information_schema (MySQL) or equivalent. Ensure your DB user has the required grants, especially in production.
  • Large schemas – On databases with hundreds of tables, the size query can be slow. Cache results or run the check on a schedule rather than on every page load.
  • Debugging unexpected formats – If sizes still show too many decimals, confirm the published config file is being loaded and that no other config file or environment variable overrides precision.
  • Extension point – Most packages of this type let you swap the formatter or view. Check the service provider bindings before editing vendor files; the precision config is often passed into the formatter, so you can reuse it in custom output.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager