Log1x/crumb

Issue with looping over items

ImprobableGenius opened this issue · 0 comments

Hi, I was trying to use this package in one my projects and I noticed that in breadcrumb.blade.php component you are accessing the items() method as a variable. If I die and dumb the $item variable it returns an object instance instead of an array.

This works when you loop over the object for reasons unknown, however the $loop variable inside the loop does not have proper values for 'remaining', 'count', 'last' and so on.

I was able to solve this by using $items() instead of $item.

I am pretty intermediate in my knowledge relating to Laravel and Blade. I am just looking to see if I am missing something here.

Thanks,
Aarish