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

Laravel Ray Laravel Package

spatie/laravel-ray

Send Laravel debug output to Ray, Spatie’s desktop debugger. Use a consistent “ray()” API to inspect variables, arrays, HTML, queries, and more, measure performance, and pause execution. Works alongside PHP, JS, and other integrations.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Debugging Efficiency: Accelerate developer onboarding and troubleshooting by replacing verbose dd()/dump() calls with a unified, interactive debugging tool (Ray). Reduces context-switching between IDE and terminal.
  • Observability Roadmap: Integrate Ray as a core debugging tool for Laravel-based products, enabling real-time inspection of:
    • Database queries (raw SQL, bindings, execution time).
    • HTTP requests/responses (headers, payloads, status codes).
    • Mailables (content, attachments, metadata).
    • Blade templates (variable dumps, conditional logic).
    • Performance bottlenecks (via measure() directives).
  • Build vs. Buy: Buy—avoids reinventing a debugging UI/UX. Spatie’s Ray is battle-tested (300K+ downloads) with Laravel-specific integrations (e.g., query watchers, email previews).
  • Use Cases:
    • Debugging Complex Workflows: Trace multi-step processes (e.g., order fulfillment) with contextual data.
    • Legacy Code Modernization: Replace hardcoded Log::debug() calls with structured Ray logs.
    • AI/ML Pipelines: Inspect model inputs/outputs (e.g., NLP preprocessing) via Ray’s MCP server.
    • Security Audits: Validate input sanitization or auth flows by logging variables in real-time.

When to Consider This Package

Adopt if:

  • Your team uses Laravel 11+ (or PHP 8.1+) and prioritizes developer velocity.
  • Debugging involves complex data structures (e.g., nested arrays, Eloquent relationships) that var_dump() can’t handle elegantly.
  • You need cross-language debugging (e.g., syncing PHP and JavaScript logs in Ray).
  • Performance profiling is critical (e.g., optimizing slow API endpoints).
  • Your stack includes mailables, queues, or Blade templates that require deep inspection.

Look elsewhere if:

  • Your app is PHP 7.x-only (Ray requires PHP 8.1+).
  • You’re constrained by licensing costs (Ray has a free tier but requires a paid license for production use).
  • Your team prefers native Laravel tools (e.g., Tinker, Laravel Debugbar) and resists new tools.
  • You debug microservices in non-PHP languages (Ray’s PHP focus limits cross-service visibility).
  • Security/compliance prohibits sending debug data to a third-party app (Ray runs locally).

How to Pitch It (Stakeholders)

For Executives: *"Ray transforms Laravel debugging from a fragmented, manual process into a real-time, interactive experience—like Chrome DevTools for PHP. By adopting spatie/laravel-ray, we’ll:

  • Cut debugging time by 30% (per Spatie’s benchmarks) by consolidating dd(), Log::debug(), and database logs into one tool.
  • Reduce onboarding friction for new devs with familiar, IDE-like debugging.
  • Future-proof observability with support for AI/ML pipelines and cross-language debugging. Cost: Free for development (20 messages/session); paid license (~$50/year) unlocks full features. ROI comes from faster releases and fewer production bugs."*

For Engineering: *"Laravel-Ray integrates seamlessly with your existing stack to give you:

  • Query Inspection: See raw SQL, bindings, and execution time—without logging to a file.
  • Email Debugging: Preview mailables before sending (including attachments and signed URLs).
  • Blade Debugging: Use @ray() directives in views to dump variables without breaking the UI.
  • Performance Tools: Measure code blocks with @measure() and pause execution with @pause(). Implementation: One composer require + 10 mins to configure. Works with Laravel 11–13 and PHP 8.1+. No vendor lock-in—data stays local (no cloud dependency)."*
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport