Git Product home page Git Product logo

Comments (3)

d13r avatar d13r commented on June 10, 2024

Your code looks correct to me.

Is it definitely that file where the error occurs? Can you post the full error message including filename & line number to check?

If so, try checking what's in the $breadcrumbs variable by putting this on the line above:

<?php var_dump($breadcrumbs) ?>

My guess would be null, in which case I would suggest opening up src/DaveJamesMiller/Breadcrumbs/Manager.php and putting var_dump($breadcrumbs) in renderArray() (here), then work backwards from there.

from laravel-breadcrumbs.

ronnievisser avatar ronnievisser commented on June 10, 2024

the full error is this.

Invalid argument supplied for foreach() (View: /home/keebo-dev/app/views/partials/breadcrumbs.blade.php) (View: /home/keebo-dev/app/views/partials/breadcrumbs.blade.php) (View: /home/keebo-dev/app/views/partials/breadcrumbs.blade.php)

var_dump is giving me this

  string(138) "<ul class="breadcrumb">
                                    <li class="active">Administration Panel</li>
                        </ul>
"

so it looks like it is hitting it twice or something. I will debug as you said

and this is de var_dump in the renderArray method

array(1) { [0]=> object(stdClass)#323 (4) { ["title"]=> string(20) "Administration Panel" ["url"]=> string(32) "http://%7Bdomain%7D.keebo-dev.be" ["first"]=> bool(true) ["last"]=> bool(true) } } 

from laravel-breadcrumbs.

ronnievisser avatar ronnievisser commented on June 10, 2024

Solved it. I was a mistake by me. Instead of doing {{ $breadcrumbs }} in my main template it did @include( 'partials.breadcrumbs'). Now it's working

from laravel-breadcrumbs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.