Laravel Telescope
Laravelの開発環境でデバッグをするときめっちゃ便利なツール。いますぐいれよう。
>Laravel Telescope is an elegant debugging 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.
導入は手順通りに行えば良い
PHPの --enable-bcmath
オプションのビルドが必要になるかも
アクセスする
UIが見たい
DBへのクエリを見ているところ
データを飛ばす
php artisan telescope:prune
感想
ローカル開発環境でデバッグが便利なのでLaravelとEloquentを採用するなら入れたい
具体的に便利なところ
Log::info()
とかで出したログもLogセクションに出てくる
Userを登録しておけば、どのユーザによるログなのかもトレースできる(Eloquentのrelationをうまく活用している?)