|
| 1 | +# Configuration — Spatie Ray |
| 2 | + |
| 3 | +Buggregator is compatible with `spatie/ray` package. The Ray debug tool supports PHP, Ruby, JavaScript, TypeScript, |
| 4 | +NodeJS, Go and Bash applications. After installing one of the libraries, you can use the ray function to quickly dump |
| 5 | +stuff. Any variable(s) that you pass will be sent to the Buggregator. |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +**Supported features**: Simple data, Labels, Caller, Trace, Counter, Class name of an object, Measure, Json, Xml, |
| 10 | +Carbon, File, Table, Image, Html, Text, Notifications, Phpinfo, Exception, Show queries, Count queries, Show events, |
| 11 | +Show jobs, Show cache, Model, Show views, Markdown, Collections, Env, Response, Request, Application log, Show Http |
| 12 | +client requests |
| 13 | + |
| 14 | +## Laravel |
| 15 | + |
| 16 | +Please make sure `ray.php` config published to the project root. |
| 17 | + |
| 18 | +You can run an artisan command to publish it in to the project root. |
| 19 | + |
| 20 | +```bash |
| 21 | +php artisan ray:publish-config |
| 22 | +``` |
| 23 | + |
| 24 | +**Env variables** |
| 25 | + |
| 26 | +``` |
| 27 | +[email protected] # Ray server host (Current HTTP buggregator port) |
| 28 | +RAY_PORT=8000 # Ray server port |
| 29 | +``` |
| 30 | + |
| 31 | +## Framework agnostic PHP |
| 32 | + |
| 33 | +In framework agnostic projects you can use this template as the ray config file. |
| 34 | + |
| 35 | +```php |
| 36 | +<?php |
| 37 | +// Save this in a file called "ray.php" |
| 38 | + |
| 39 | +return [ |
| 40 | + /* |
| 41 | + * This settings controls whether data should be sent to Ray. |
| 42 | + */ |
| 43 | + 'enable' => true, |
| 44 | + |
| 45 | + /* |
| 46 | + * The host used to communicate with the Ray app. |
| 47 | + */ |
| 48 | + |
| 49 | + |
| 50 | + /* |
| 51 | + * The port number used to communicate with the Ray app. |
| 52 | + */ |
| 53 | + 'port' => 8000, |
| 54 | + |
| 55 | + /* |
| 56 | + * Absolute base path for your sites or projects in Homestead, Vagrant, Docker, or another remote development server. |
| 57 | + */ |
| 58 | + 'remote_path' => null, |
| 59 | + |
| 60 | + /* |
| 61 | + * Absolute base path for your sites or projects on your local computer where your IDE or code editor is running on. |
| 62 | + */ |
| 63 | + 'local_path' => null, |
| 64 | + |
| 65 | + /* |
| 66 | + * When this setting is enabled, the package will not try to format values sent to Ray. |
| 67 | + */ |
| 68 | + 'always_send_raw_values' => false, |
| 69 | +]; |
| 70 | +``` |
| 71 | + |
| 72 | +You can find out more information about installation and configuration |
| 73 | +on [official site](https://spatie.be/docs/ray/v1/introduction) |
0 commit comments