Everything you need to instrument Laravel.
The package ships with a single config file and one artisan command. Most teams are running their first audit within five minutes of composer require.
Lighthouse, plus the server context that produced the score.
Laravel Vitals runs Google Lighthouse against your own pages, captures what your server was doing at that exact moment β queries, memory, N+1 problems β and points directly at the lines of code responsible. Everything lands in a dashboard at /vitals that any team member can read and act on. Your data stays in your own database β no SaaS, no per-seat billing.
Install, declare a URL, run an audit.
composer require corentinbtmps/laravel-vitals
php artisan vendor:publish --tag=vitals-config
php artisan migrate
php artisan vitals:install
<head>
<meta charset="utf-8">
@vitalsRum
</head>
'urls' => ['home' => '/'],
php artisan vitals:audit home --sync
Open /vitals β Lighthouse score, backend telemetry, and recommendations with file:line references.
How an audit actually runs.
-
1
Declare URLs
config/vitals.php holds your URLs as label => /path pairs. Run vitals:audit manually, on a schedule, or from CI.
-
2
Audit starts
The package signs an X-Vitals-Audit-Id header with your APP_KEY and spawns Lighthouse (local Node, Playwright, or Google PageSpeed API depending on your driver).
-
3
Backend telemetry
While Lighthouse loads the page, your own middleware detects the signed header and records query count, query time, N+1 suspicion, peak memory, views, jobs, cache hits/misses.
-
4
Lighthouse result
Scores arrive (0-100) alongside raw metric values: LCP, INP, CLS, TTFB, FCP, TBT, Speed Index.
-
5
Code analysis
Static analyzers scan your Blade views, Vite config, and composer.json to attach exact file:line references to each Lighthouse finding. Everything is stored and surfaced at /vitals.
Getting started
Audit drivers
Telemetry + monitoring
SEO checks
CI + notifications
Reference
Plain-language explanations of every metric.
Each Lighthouse metric β LCP, INP, CLS, TTFB β has a "Learn" page that explains it in three sentences, shows the threshold, and links the Web Vitals reference. Useful for onboarding new engineers.
Full reference on GitHub.
The complete README covers every Artisan command, the JSON API endpoints, the configuration surface (~30 env-overridable knobs), privacy guarantees, troubleshooting, and contribution guidelines.