This extension helps you to generate spatie/ray debug syntax, no longer need to type manually 🔥.
- PHP
- Laravel
- More coming soon.
Ray: Variable - Display a string, array or object (ctrl+alt+p command shortcut)
ray($variable);Ray: Variable - Display a string, array or object (ctrl+alt+d command shortcut)
ray($variable)->die();Ray: Views - Display all views
ray()->showViews();Ray: Env - Display environment variables
ray()->env();Ray: Requests - Display all requests
ray()->showRequests();Ray: Model - Display the attributes and relations of a model
ray()->model($model);Ray: Carbon - Send Carbon instances to Ray
ray()->carbon($carbon);Ray: Classname - Send the classname of an object to Ray
ray()->className($object);Ray: Backtrace - Check entire backtrace
ray()->backtrace();Ray: Caller - Discover where code is being called
ray()->caller();Ray: Clear Screen - Clear current screen
ray()->clearScreen();Ray: Clear All - Clear current and all previous screens
ray()->clearAll();Ray: Count - Count how many times a piece of code is called
ray()->count();Ray: Measure - Display runtime and memory usage
ray()->measure();Ray: Pause - Pause execution
ray()->pause();Ray: PHP Info - Display PHP info
ray()->phpinfo();Ray: Separtor - Add a visual separator
ray()->separator();Ray: Trace - Check entire backtrace
ray()->trace();Ray: Exception - Display extended information about an Error or Exception
ray()->exception($e);Ray: HTML - Send HTML to Ray
ray()->html($html);Ray: Image - Display an image in Ray
ray($variable);Ray: JSON - Send JSON to Ray
ray()->image($path);Ray: Text - Display the raw text for a string while preserving whitespace formatting
ray()->text($string);Ray: XML - Display formatted XML in Ray
ray()->xml($xmlString);Ray: Queries - Display all queries that are executed
ray()->showQueries();Ray: Queries (Callback) - Display all queries that are executed in Callback
ray()->showQueries(function() {
User::all(); // this query will be displayed.
});Ray: Stop Show Queries - Stop displaying queries
ray()->stopShowingQueries();Ray: Count Queries - Count all queries that are executed within a callable
ray()->countQueries(function() {
User::all();
User::all();
User::all();
});Ray: Duplicate Queries - Display all duplicated queries that are executed
ray()->showDuplicateQueries();Ray: Stop Show Duplicated Queries - Stop displaying duplicated queries
ray()->stopShowingDuplicateQueries();Ray: Duplicate Queries (callback) - Display all duplicated queries that are executed in callback
ray()->showDuplicateQueries(function() {
User::where('id', 1)->get('id');
User::where('id', 1)->get('id'); // this query will be displayed.
});Ray: Slow Queries - Display all queries that take longer than N milliseconds to execute
ray()->showSlowQueries(100);Ray: Slow Queries (callback) - Display all queries that take longer than N milliseconds to execute in callback
ray()->showSlowQueries(100, function() {
User::where('id', 1)->get('id'); // this query will be displayed if it takes longer than 100ms.
});Ray: Events - Display all events that are executed
ray()->showEvents();Ray: Stop Show Events - Stop Displaying all events that are executed
ray()->stopShowingEvents();Ray: Events (Callback) - Display all events that are executed in callback
ray()->showEvents(function() {
event(new MyEvent()); // this event will be displayed.
});Ray: Jobs - Display all jobs that are executed
ray()->showJobs();Ray: Stop Show Jobs - Stop Displaying jobs
ray()->stopShowingJobs();Ray: Jobs (Callback) - Display all jobs that are executed in callback
ray()->showJobs(function() {
dispatch(new TestJob()); // this job will be displayed.
});Ray: Cache - Display all cache events that are executed
ray()->showCache();Ray: Stop Show Cache - Stop displaying cache
ray()->stopShowingCache();Ray: Http Client Requests - Display all http client requests that are executed
ray()->showHttpClientRequests();Ray: Stop Show Http Client Requests - Stop displaying http client requests
ray()->stopShowingHttpClientRequests();Ray: Http Client Requests (callback) - Display all http client requests that are executed in callback
ray()->showHttpClientRequests(function() {
Http::get('https://example.com'); // this request will be displayed.
});