Skip to content
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.

Call to undefined method DaveJamesMiller\Breadcrumbs\Facade::render() #71

Closed
ghost opened this issue Apr 22, 2015 · 5 comments
Closed

Comments

@ghost
Copy link

ghost commented Apr 22, 2015

Hello,
I'm using laravel 4.2.
I have already followed 2 steps of installation, 3 steps of usage. But I still have this error:
Call to undefined method DaveJamesMiller\Breadcrumbs\Facade::render()
Please help me!
Thank you.

@d13r
Copy link
Owner

d13r commented Apr 22, 2015

I'm not sure what you expect me to do with so little information to go on...

https://github.com/davejamesmiller/laravel-breadcrumbs/blob/master/CONTRIBUTING.rst

@wdmtech
Copy link

wdmtech commented Apr 22, 2015

@anhuibl Did you add the facade to your aliases?

'aliases' => [
    // ...
    'Breadcrumbs' => 'DaveJamesMiller\Breadcrumbs\Facade',
],

@ghost
Copy link
Author

ghost commented Apr 23, 2015

Thanks Dave James Miller and wdmTech for supporting.

My environment information:

  • Breadcrumbs version: 2 (.x - For laravel 4.x)
  • Laravel version: 4.2
  • PHP version: PHP 5.5.9-1ubuntu4.9 (cli) (built: Apr 17 2015 11:44:57)
  • Local (my laptop)

Here are what I did:

  1. I installed via Composer by command:
    $composer require davejamesmiller/laravel-breadcrumbs:2.*
    then I update composer.
  2. I added to app/config/app.php as instructions, 'DaveJamesMiller\Breadcrumbs\ServiceProvider' (provider) and 'Breadcrumbs' => 'DaveJamesMiller\Breadcrumbs\Facade' (aliases)
  3. I created file app/breadcrumbs.php with content like this: push('Home', route('home')); }); ?>
  4. I ran $php artisan config:publish davejamesmiller/laravel-breadcrumbs
    However I used the default template. I changed nothing.
  5. In my main layout, I included a footer contains this:
    @yield('breadcrumbs')
  6. I added something in my home view like this:
    @extends('layouts.main')
    ... (some other sections)
    @section('content') ... @Stop
    @section('breadcrumbs', Breadcrumbs::render('home'))

I ran the home page and I have this error message:

Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)
Call to undefined method DaveJamesMiller\Breadcrumbs\Facade::render()
Open: /var/www/Plaim/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php

    switch (count($args))
    {
        case 0:
            return $instance->$method();

        case 1:
            return $instance->$method($args[0]);

        case 2:

@ghost
Copy link
Author

ghost commented Apr 23, 2015

Hi, my supervisor have detected the problem.
I skipped a step-2 in app/config/local/app.php. Because I am in local environment.

Thanks for all.

@d13r
Copy link
Owner

d13r commented Apr 23, 2015

👍

@d13r d13r closed this as completed Apr 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants