I'm just doing some testing (laravel 5.4.15) and hitting a route to trigger it. There is no output from this controller (on purpose), which also makes debugbar have js errors and not display. Viewing the page source shows all of the debugbar generated js/data needed for the bar, but it just doesn't show. Even if you just echo 'hi'; from the controller with no actual HTML output then the debugbar shows properly.
javascript?v=1488233004:4
Uncaught TypeError: Cannot read property 'style' of undefined
at Ja (https://xxx.dev/_debugbar/assets/javascript?v=1488233004:4:24832)
at Function.css (https://xxx.dev/_debugbar/assets/javascript?v=1488233004:4:30287)
at Ea (https://xxx.dev/_debugbar/assets/javascript?v=1488233004:4:23639)
at Fa (https://xxx.dev/_debugbar/assets/javascript?v=1488233004:4:23723)
at Va (https://xxx.dev/_debugbar/assets/javascript?v=1488233004:4:28273)
at m.fn.init.show (https://xxx.dev/_debugbar/assets/javascript?v=1488233004:4:31805)
at m.fn.init.m.fn.(anonymous function) [as show] (https://xxx.dev/_debugbar/assets/javascript?v=1488233004:5:6831)
at child.showTab (https://xxx.dev/_debugbar/assets/javascript?v=1488233004:749:30)
at child.restoreState (https://xxx.dev/_debugbar/assets/javascript?v=1488233004:574:30)
at https://xxx.dev/test:35:13
I had just ran into this issue..
I was just refreshing the page, and I had skipped the @extends part in my blade file.. So, If you are returning a view from the controller, make sure that the view extends the layout file.
Something like this.
YourController.php
public function methodName()
{
// your code...
return view('view.name');
}
name.blade.php:
{{-- At the top of the file --}}
@extends('layout')
layout.blade.php
// Your html master page design
I ran also in this issue and running php artisan view:clear fixed the problem.
Most helpful comment
I had just ran into this issue..
I was just refreshing the page, and I had skipped the
@extendspart in my blade file.. So, If you are returning a view from the controller, make sure that the view extends the layout file.Something like this.
YourController.php
name.blade.php:
layout.blade.php
// Your html master page design