Weave Code
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

Ray Laravel Package

spatie/ray

Send debug output from any PHP app to Ray, Spatie’s desktop debugger. Inspect dumps, arrays, HTML, queries, and more with a consistent API across Laravel and vanilla PHP. Measure performance, pause execution, and keep fast feedback without cluttering logs.

View on GitHub
Deep Wiki
Context7

Debug with Ray to fix problems faster

Frequently asked questions about Ray
How do I install spatie/ray in a Laravel project?
Run `composer require spatie/ray --dev` to install the package. For Laravel-specific features, use `composer require spatie/laravel-ray --dev` instead. The package auto-registers in Laravel, so no additional setup is needed beyond configuring `config/ray.php` if required.
Does spatie/ray work with Laravel 13?
Yes, spatie/ray officially supports Laravel 10–13. For Laravel 13, use the latest `spatie/laravel-ray` package, which includes Laravel-specific helpers like the `ray()` facade. Check the [Laravel-Ray documentation](https://myray.app/docs/laravel) for version-specific details.
Can I use Ray to debug Eloquent queries?
Absolutely. Enable query logging with `DB::enableQueryLog()`, then use `ray()` to inspect queries alongside their results. Ray displays query plans, bindings, and execution time—ideal for optimizing slow queries in Laravel.
How does Ray handle sensitive data in production?
Ray automatically filters sensitive data (e.g., passwords, tokens) when `RAY_ENV=production`. For extra safety, use `ray()->withoutSensitiveData()` to exclude specific variables. The package is MIT-licensed and designed for secure debugging.
Will Ray slow down my Laravel application in production?
No, Ray has minimal overhead in production. Disable debugging entirely with `RAY_ENV=production`, or use `RAY_COMPRESS=1` to reduce payload size. Avoid frequent `ray()` calls in hot paths, as they stream data to the desktop app.
Can I debug Livewire or Inertia.js components with Ray?
Yes, Ray integrates with Livewire and Inertia via its MCP server. Use `window.Ray` in JavaScript to sync PHP and frontend debugging. Inspect component props, state, and Blade templates in real time—no terminal juggling required.
What’s the difference between spatie/ray and spatie/laravel-ray?
spatie/ray is the core package for vanilla PHP, while `spatie/laravel-ray` adds Laravel-specific features like the `ray()` facade, Eloquent query inspection, and middleware. Use the latter for full Laravel integration.
How do I measure code performance with Ray?
Use `ray()->timeSection('section_name', fn() => $yourCode)` to measure execution time. Ray displays timings in a collapsible UI, helping you identify bottlenecks in Laravel controllers, jobs, or commands.
Does Ray work in CI/CD environments?
Ray is primarily a desktop tool, but you can log output to a file or use CLI fallbacks. For CI, consider `RAY_ENV=production` to disable debugging or use `spatie/laravel-log` as an alternative for structured logs.
Are there alternatives to Ray for Laravel debugging?
Yes, alternatives include Laravel Debugbar (browser-based), Telescope (database-driven), and Xdebug (CLI/IDE). Ray stands out for its real-time desktop UI, cross-language sync (PHP/JS), and seamless Laravel integration with minimal setup.
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.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai