Advanced Usage

Dependency Injection

{note} You're browsing the documentation for an old version of laravel-breadcrumbs. Consider upgrading your project to v4. Check your version with the following command:

composer show rawilk/laravel-breadcrumbs

You can use dependency injection to access the Breadcrumbs instance if you prefer, instead of using the Breadcrumbs:: facade:

use Rawilk\Breadcrumbs\Breadcrumbs;
use Illuminate\Support\ServiceProvider;

class MyServiceProvider extends ServiceProvider
{
    public function boot(Breadcrumbs $breadcrumbs)
    {
        $breadcrumbs->for(...);
    }
}
Previous
Using Multiple Files
Caught a mistake? Suggest an edit on GitHub