The folks over at Spatie have released a new tool called Ray that helps you with debugging.
Ray is a beautiful, lightweight desktop app that helps you debug your app. After installing one of the libraries to send information to Ray, you can use the
ray()function to quickly dump stuff. Any variable(s) that you pass to Ray will be displayed.
Since Spatie mainly develops with Laravel it plays very nice with it. It supports logging all performed queries or properly displaying the contents of any Eloquent Model / Mailable for example.
ray('Hello world'); ray(['a' => 1, 'b' => 2])->color('red'); ray('multiple', 'arguments', 'are', 'welcome'); ray()->showQueries(); User::firstWhere('email', 'firstname.lastname@example.org');
At its core Ray is “simply” an app that listens for incoming messages on a specific port (e.g.
Ray Docs →
Ray Introductory Blogpost →