wayofdev/laravel-cycle-orm-adapter
import ExternalLink from "../../components/external-link"; import Image from 'next/image'
<ExternalLink href="https://laravel.com/docs/11.x/telescope">Laravel Telescope</ExternalLink> is an elegant debug assistant for the Laravel framework. Telescope provides insight into the requests coming into your application, exceptions, log entries, database queries, queued jobs, mail, notifications, cache operations, scheduled tasks, variable dumps and more. Telescope makes a wonderful companion to your local Laravel development environment.
This adapter package provides you with abillity to also log and debug your Cycle ORM queries in Laravel Telescope.
Install, telescope as usual, via Composer package manager:
composer require laravel/telescope
Add the following configuration to your .env file:
...
DB_USE_TELESCOPE_LOGGER=true
...
After installing Telescope, publish its assets and migrations using the telescope:install Artisan command.
php artisan telescope:install
After installing Telescope, you should also run the migrate command in order to create the tables needed to store Telescope's data, but as you are using Cycle ORM, you should avoid using default php artisan migrate command, and instead, do the following steps:
Run the following command to create the Telescope tables:
php artisan cycle:migrate:init
php artisan cycle:orm:migrate --split --run
Next, edit your config/telescope.php configuration file and add the following lines to the watchers array, right after the defaultWatchers\QueryWatcher::class line:
return [
// ...
'watchers' => [
// ...
Watchers\QueryWatcher::class => [
'enabled' => true,
'ignore_packages' => true,
'ignore_paths' => [],
'slow' => 100,
],
WayOfDev\Cycle\Bridge\Telescope\Watchers\QueryWatcher::class => [
'enabled' => true,
'ignore_packages' => true,
'ignore_paths' => [],
'slow' => 100,
],
],
// ...
];
Finally, you may access the Telescope dashboard via the /telescope route. Of course, don't forget to start your Laravel application:
php artisan serve
Now, you can access the Laravel Telescope dashboard and see all the CycleORM queries executed by your application.
How can I help you explore Laravel packages today?