laravel-breadcrumbs
Api
Breadcrumbs Facade
On this page
{note} laravel-breadcrumbs has been archived and is no longer maintained. Use caution when installing in your apps.
{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`
for
/**
* Register a new breadcrumb.
*
* @param string $name
* @param callable $callback
* @return void
*/
Breadcrumbs::for(string $name, callable $callback): void;
before
/**
* Register a breadcrumb to be rendered before every breadcrumb.
*
* @param callable $callback
* @return void
*/
Breadcrumbs::before(callable $callback): void;
exists
/**
* Check if a breadcrumb exists.
* Omit name to check if a breadcrumb exists for the current route.
*
* @param string|null $name
* @return bool
*/
Breadcrumbs::exists(string $name = null): bool;
generate
/**
* Generate breadcrumbs for the given registered breadcrumb, or the current route.
*
* @param string|null $name
* @param ...$params
* @return \Illuminate\Support\Collection
*/
Breadcrumbs::generate(string $name = null, ...$params): Collection;
view
/**
* Render a registered breadcrumb using the given view.
*
* @param string $view
* @param string|null $name
* @param ...$params
* @return string
*/
Breadcrumbs::view(string $view, string $name = null, ...$params): string;
render
/**
* Render a registered breadcrumb.
*
* @param string|null $name
* @param ...$params
* @return string
*/
Breadcrumbs::render(string $name = null, ...$params): string;
current
/**
* Retrieve the breadcrumb for the current page.
*
* @return object|null
*/
Breadcrumbs::current(): ?object;
setCurrentRoute
/**
* Manually override the current route.
*
* @param string $name
* @param ...$params
* @return \Rawilk\Breadcrumbs\Breadcrumbs
*/
Breadcrumbs::setCurrentRoute(string $name, ...$params): \Rawilk\Breadcrumbs\Breadcrumbs;
clearCurrentRoute
/**
* Clear the current route from Breadcrumbs.
*
* @return \Rawilk\Breadcrumbs\Breadcrumbs
*/
Breadcrumbs::clearCurrentRoute(): \Rawilk\Breadcrumbs\Breadcrumbs;
macro
/**
* Register a custom macro.
*
* @param string $name
* @param object|callable $macro
* @return void
*/
Breadcrumbs::macro(string $name, callable $macro): void;