Laravel Debugbar導入でつまったのでメモメモ
基本的に以下のやり方でやりました。
/memory_limit で検索
i でインサートモード
memory_limit = -1 に修正
esc
:wq で保存して終了
な感じでOK
けど、どうしてもデバッグバーで表示されない。
そこでログを調べると以下のような記述が。
[2020-05-13 20:47:40] local.ERROR: Debugbar exception: Route [debugbar.openhandler] not defined. [2020-05-13 20:58:31] local.ERROR: Debugbar exception: Route [debugbar.openhandler] not defined. [2020-05-13 20:58:58] local.ERROR: Debugbar exception: Route [debugbar.openhandler] not defined. [2020-05-13 20:59:20] local.ERROR: Debugbar exception: Route [debugbar.openhandler] not defined. [2020-05-13 21:26:15] local.ERROR: Debugbar exception: Route [debugbar.openhandler] not defined. [2020-05-13 21:48:08] local.ERROR: Debugbar exception: Route [debugbar.openhandler] not defined. [2020-05-13 21:54:45] local.ERROR: Debugbar exception: Route [debugbar.openhandler] not defined. [2020-05-13 21:56:09] local.ERROR: Debugbar exception: Route [debugbar.openhandler] not defined. [2020-05-13 22:06:53] local.ERROR: Debugbar exception: Route [debugbar.openhandler] not defined.
なんのこっちゃ。ルートがうまく設定できていない的なエラーかな。
よくわからないのでそのまま検索すると以下のような指示が出てきた。
php artisan clear-compiled php artisan clear php artisan cache:clear php artisan view:clear php artisan route:clear php artisan config:clear
困ったときの再起動くらいの気持ちで全てのコマンドを実施。
結果
デバッグバー出てきました!!!
今回docker環境だったのでうまくいかなかったのかもしれません。
あとがき
.envに記述した内容が反映されてなくてcache:clearしたことを思い出しました。
もう困ったときはclearしておけば良いかもしれません。