How to find exact error line in laravel 5.4 blade?

I know laravel caches blade files, and when there is an error in blade, in version 5.3 error would be something like this :

Undefined offset: 0 (View:b5c0ef4df49585eadd7fc1fa15b2d8a03e8c3bdd.php) line: 47

Then I can go to cached files and find the exact line,

But in version 5.4 laravel reference the exact blade file(not cached file) but without a line number! Something like this :

Undefined offset: 0 (View: C:wamp64wwwprojectresourcesviewseventspartialevent_details_members.blade.php)
in Collection.php (line 1537)

Now how to find the error?

UPDATE

I know where the problem is, and how to fix that, But I want Laravel to tell me this automatically whether I have to look for it manually. what if the blade file is very big?

Answer

You can use Laravel Debugbar. This is easy to use. Follow below link you will get what you want.

https://github.com/barryvdh/laravel-debugbar

Leave a Reply

Your email address will not be published. Required fields are marked *