spatie/laravel-ray
Send Laravel debug output to Ray, Spatie’s desktop debugging app. Use a consistent API to inspect variables, arrays, HTML, queries and more, measure performance, and pause execution. Works across Laravel/PHP with Ray’s rich UI.
spatie/laravel-ray aligns perfectly with Laravel’s debugging ecosystem, complementing native tools like dd(), dump(), and Log::debug(). It integrates seamlessly with Laravel’s service container and event system, enabling real-time debugging via a desktop app (Ray) without polluting logs or requiring CLI access.ray($user)).QueryWatcher).RequestWatcher).BladeWatcher and MailWatcher)..env). Production-ready with conditional toggling (e.g., APP_DEBUG=false disables Ray entirely).spatie/ray (v1.45+), laravel/framework (version-agnostic).zbateson/mail-mime-parser (for email debugging), rector/rector (for code cleanup).composer require + php artisan ray:install. Auto-detects Laravel version and applies minimal patches (e.g., PHP 8.5 deprecations).laravel-permission, laravel-backup) reduces vendor lock-in risk.ray:offline mode for air-gapped environments.ray() in loops) may slow requests. Mitigate via:
if (app()->environment('local')) ray($var)..env (RAY_MAX_MESSAGES_PER_MINUTE=100).ray() calls. Mitigate via:
Ray::ignore([Password::class])).RAY_ENABLED=false in staging/prod).dd()/Log::debug() to Ray? (Training + incentives for adoption.)QueryExecuted).ray:clean to remove debug calls).Ray::shouldReceive('send')->never()).composer require spatie/laravel-ray..env:
RAY_ENABLED=true
RAY_PROJECT_NAME="MyApp"
ray() in a single controller/action.dd() with ray() in critical paths (e.g., payment flows).ray:clean to remove debug calls post-release.RAY_ENABLED=true.^1.0 constraint.illuminate/support for Laravel-specific features.mail-mime-parser only needed for email debugging.app/Providers/RayServiceProvider.php).php artisan vendor:publish --provider="Spatie\Ray\RayServiceProvider"..env and config/ray.php.ray() calls + exception debugging.ray()->measure()).ray:clean in CI for debug call removal.spatie/ray v1.45+) are automated via composer update.php artisan ray:clean to remove debug calls pre-release.ray() calls in production branches..env and config/ray.php in a shared template..env (RAY_ENABLED=true), firewall rules, and Ray app connection.RAY_MAX_MESSAGES.ray() is called within a request lifecycle (not in CLI commands).ray()->debug() to inspect Ray’s internal state.RAY_ENABLED=false) or use conditional logic:
if (app()->environment('local') ||
How can I help you explore Laravel packages today?