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

Global Ray Laravel Package

spatie/global-ray

Install Ray globally to use ray(), rd(), dump() and dd() in any PHP project. Send debug output (arrays, HTML, queries, markdown) to the Ray desktop app, measure performance, and pause execution—same debugging workflow across frameworks and plain PHP.

View on GitHub
Deep Wiki
Context7

spatie/global-ray - Send debug output from all PHP files to Ray

Latest Version on Packagist Tests Total Downloads

This package can be installed globally to send debug output from any PHP app to Ray, the desktop debugging app from Spatie.

Ray is a desktop debugging app that keeps the instant feedback you get from console.log() and dump() but lets you use the same debugging syntax across Laravel, PHP, JavaScript and more frameworks and languages.

  • Send anything you want to Ray, including HTML, arrays, queries, and Markdown files.
  • View and interact with output your AI sends to Ray using our MCP server.
  • Measure performance and pause execution in PHP.
  • Beautifully designed themes to match your style.

Download our free trial and send up to 20 messages each session. Enjoying Ray? Buy a license to unlock the app and get full access.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install the global Ray via composer:

composer global require spatie/global-ray
global-ray install

When running global-ray install, we'll add a line in your php.ini to automatically load the functions provided by this package.

Usage

You can use ray() with all supported methods in any PHP file.

The rd(), dump() and dd() functions will also be available in any PHP project or script.

Using framework specific functionality

Using Laravel, WordPress, Yii, or another supported PHP framework or CMS? Install the dedicated integration for better integration and framework-specific features. If one of those packages is detected, it will be used instead of global-ray.

How to uninstall

To uninstall you must first issue this command:

global-ray uninstall

This will remove the line in php.ini that automatically loads ray() and related functions.

After that, you can uninstall the package itself using

composer global remove spatie/global-ray

Troubleshooting

If all your PHP scripts suddenly terminate very early with a strange error after you upgrade PHP or switch to a different version, the global-ray might be the cause.

As mentioned before, during install we slightly modify your php.ini. To manually uninstall global ray, remove the script named global-ray-loader.php in the auto_prepend_file directive in php.ini.

You find the location of your php.ini by executing this command:

php --ini

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

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