laravel-breadcrumbs

Api

Breadcrumbs Facade

{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`

/**
 * Register a new breadcrumb.
 *
 * @param string $name
 * @param callable $callback
 * @return void
 */
Breadcrumbs::for(string $name, callable $callback): void;
/**
 * Register a breadcrumb to be rendered before every breadcrumb.
 *
 * @param callable $callback
 * @return void
 */
Breadcrumbs::before(callable $callback): void;
/**
 * 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 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;
/**
 * 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 a registered breadcrumb.
 *
 * @param string|null $name
 * @param ...$params
 * @return string
 */
Breadcrumbs::render(string $name = null, ...$params): string;
/**
 * Retrieve the breadcrumb for the current page.
 *
 * @return object|null
 */
Breadcrumbs::current(): ?object;
/**
 * Manually override the current route.
 *
 * @param string $name
 * @param ...$params
 * @return \Rawilk\Breadcrumbs\Breadcrumbs
 */
Breadcrumbs::setCurrentRoute(string $name, ...$params): \Rawilk\Breadcrumbs\Breadcrumbs;
/**
 * Clear the current route from Breadcrumbs.
 *
 * @return \Rawilk\Breadcrumbs\Breadcrumbs
 */
Breadcrumbs::clearCurrentRoute(): \Rawilk\Breadcrumbs\Breadcrumbs;
/**
 * Register a custom macro.
 *
 * @param string $name
 * @param object|callable $macro
 * @return void
 */
Breadcrumbs::macro(string $name, callable $macro): void;
Previous
Custom Classes