For years, I have been tucking away WordPress performance stats in HTML comments in the footer. I feel they are the perfect middle ground: invisible to users, but instantly available to developers checking if a page is cached or how fast the server is responding.

When I started working with Laravel recently, I found myself missing this simple method of tracking performance. I wanted to see my page generation times in production without installing heavy debugging suites.

Laravel production stats example

Why use it?

Most Laravel profiling tools are designed strictly for local development. They are either too heavy for production or pose security risks. Laravel Production Stats is built specifically for your live environment:

  • Zero Configuration: Install it and it starts working immediately.
  • Non-Intrusive: Stats are injected as simple HTML comments.
  • Production-Safe: It only processes HTML responses, so it won’t break your API (JSON) or XML feeds.
  • Instant Verification: Just view the page source to see exactly how your app is performing in the real world.

Installation

Getting started takes seconds via Composer:

Bash
composer require ryanhellyer/laravel-production-stats

Repository

You can peruse the code on GitHub.
github.com/ryanhellyer/laravel-production-stats/