spatie/lighthouse-php
Run Google Lighthouse audits from PHP. Test any URL and retrieve category scores (performance, accessibility, SEO, etc.) and individual audit details. Configure headers, user agent, categories, CPU throttling, and max load wait, then run and parse results.
Adopt when:
Look elsewhere if:
lighthouse-ci) and prefer ecosystem parity."This package lets us automate Google Lighthouse audits—performance, accessibility, SEO, and PWA checks—directly in our PHP/Laravel stack. By integrating it into our CI pipeline, we’ll catch critical issues before they reach users, reducing bounce rates and improving SEO rankings. It’s a low-cost, high-impact way to enforce web best practices at scale, with no need for external tools or manual QA. Think of it as ‘autopilot for web quality.’"
Key Outcomes:
*"Spatie’s lighthouse-php gives us a PHP-friendly way to run Lighthouse programmatically. Here’s why it’s a win:
exec()), avoiding Node.js toolchain overhead.job:failed) or queue audits for async processing.Example Use Cases:
php artisan lighthouse:audit --url=https://staging.example.com in your deploy.php.Trade-offs:
Next Steps:
How can I help you explore Laravel packages today?