├── classes ├── BreadcrumbsException.php ├── BreadcrumbsGenerator.php ├── BreadcrumbsManager.php ├── BreadcrumbsServiceProvider.php ├── Exceptions │ ├── DuplicateBreadcrumbException.php │ ├── InvalidBreadcrumbException.php │ ├── UnnamedRouteException.php │ └── ViewNotSetException.php └── Facades │ └── Breadcrumbs.php ├── composer.json ├── config └── breadcrumbs.php └── views ├── bootstrap2.blade.php ├── bootstrap3.blade.php ├── bootstrap4.blade.php ├── bulma.blade.php ├── foundation6.blade.php ├── json-ld.php ├── materialize.blade.php └── uikit.blade.php /classes/BreadcrumbsException.php: -------------------------------------------------------------------------------- 1 | breadcrumbs = new Collection; 40 | $this->callbacks = $callbacks; 41 | 42 | foreach ($before as $callback) { 43 | $callback($this); 44 | } 45 | 46 | $this->call($name, $params); 47 | 48 | foreach ($after as $callback) { 49 | $callback($this); 50 | } 51 | 52 | return $this->breadcrumbs; 53 | } 54 | 55 | /** 56 | * Call the closure to generate breadcrumbs for a page. 57 | * 58 | * @param string $name The name of the page. 59 | * @param array $params The parameters to pass to the closure. 60 | * @throws InvalidBreadcrumbException if the name is not registered. 61 | */ 62 | protected function call(string $name, array $params): void 63 | { 64 | if (! isset($this->callbacks[ $name ])) { 65 | throw new InvalidBreadcrumbException($name); 66 | } 67 | 68 | $this->callbacks[$name]($this, ...$params); 69 | } 70 | 71 | /** 72 | * Add breadcrumbs for a parent page. 73 | * 74 | * Should be called from the closure for a page, before `push()` is called. 75 | * 76 | * @param string $name The name of the parent page. 77 | * @param array ...$params The parameters to pass to the closure. 78 | * @throws InvalidBreadcrumbException 79 | */ 80 | public function parent(string $name, ...$params): void 81 | { 82 | $this->call($name, $params); 83 | } 84 | 85 | /** 86 | * Add a breadcrumb. 87 | * 88 | * Should be called from the closure for each page. May be called more than once. 89 | * 90 | * @param string $title The title of the page. 91 | * @param string|null $url The URL of the page. 92 | * @param array $data Optional associative array of additional data to pass to the view. 93 | */ 94 | public function push(string $title, string $url = null, array $data = []): void 95 | { 96 | $this->breadcrumbs->push((object) array_merge($data, compact('title', 'url'))); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /classes/BreadcrumbsManager.php: -------------------------------------------------------------------------------- 1 | generator = $generator; 60 | $this->router = $router; 61 | $this->viewFactory = $viewFactory; 62 | } 63 | 64 | /** 65 | * Register a breadcrumb-generating callback for a page. 66 | * 67 | * @param string $name The name of the page. 68 | * @param callable $callback The callback, which should accept a Generator instance as the first parameter and may 69 | * accept additional parameters. 70 | * @return void 71 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\DuplicateBreadcrumbException If the given name has already been 72 | * used. 73 | */ 74 | public function for(string $name, callable $callback): void 75 | { 76 | if (isset($this->callbacks[$name])) { 77 | throw new DuplicateBreadcrumbException($name); 78 | } 79 | 80 | $this->callbacks[$name] = $callback; 81 | } 82 | 83 | /** 84 | * Register a breadcrumb-generating callback for a page. 85 | * 86 | * For backwards-compatibility with v5.0.0 and below. 87 | * 88 | * @param string $name The name of the page. 89 | * @param callable $callback The callback, which should accept a Generator instance as the first parameter and may 90 | * accept additional parameters. 91 | * @return void 92 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\DuplicateBreadcrumbException If the given name has already been 93 | * used. 94 | * @see self::for() 95 | */ 96 | public function register(string $name, callable $callback): void 97 | { 98 | $this->for($name, $callback); 99 | } 100 | 101 | /** 102 | * Register a closure to call before generating breadcrumbs for the current page. 103 | * 104 | * For example, this can be used to always prepend the homepage without needing to manually add it to each page. 105 | * 106 | * @param callable $callback The callback, which should accept a Generator instance as the first and only parameter. 107 | * @return void 108 | */ 109 | public function before(callable $callback): void 110 | { 111 | $this->before[] = $callback; 112 | } 113 | 114 | /** 115 | * Register a closure to call after generating breadcrumbs for the current page. 116 | * 117 | * For example, this can be used to append the current page number when using pagination. 118 | * 119 | * @param callable $callback The callback, which should accept a Generator instance as the first and only parameter. 120 | * @return void 121 | */ 122 | public function after(callable $callback): void 123 | { 124 | $this->after[] = $callback; 125 | } 126 | 127 | /** 128 | * Check if a breadcrumb with the given name exists. 129 | * 130 | * If no name is given, defaults to the current route name. 131 | * 132 | * @param string|null $name The page name. 133 | * @return bool Whether there is a registered callback with that name. 134 | */ 135 | public function exists(string $name = null): bool 136 | { 137 | if (is_null($name)) { 138 | try { 139 | [$name] = $this->getCurrentRoute(); 140 | } catch (UnnamedRouteException $e) { 141 | return false; 142 | } 143 | } 144 | 145 | return isset($this->callbacks[$name]); 146 | } 147 | 148 | /** 149 | * Generate a set of breadcrumbs for a page. 150 | * 151 | * @param string|null $name The name of the current page. 152 | * @param mixed ...$params The parameters to pass to the closure for the current page. 153 | * @return \Illuminate\Support\Collection The generated breadcrumbs. 154 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\UnnamedRouteException if no name is given and the current route 155 | * doesn't have an associated name. 156 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\InvalidBreadcrumbException if the name is (or any ancestor names 157 | * are) not registered. 158 | */ 159 | public function generate(string $name = null, ...$params): Collection 160 | { 161 | $origName = $name; 162 | 163 | // Route-bound breadcrumbs 164 | if ($name === null) { 165 | try { 166 | [$name, $params] = $this->getCurrentRoute(); 167 | } catch (UnnamedRouteException $e) { 168 | if (config('breadcrumbs.unnamed-route-exception')) { 169 | throw $e; 170 | } 171 | 172 | return new Collection; 173 | } 174 | } 175 | 176 | // Generate breadcrumbs 177 | try { 178 | return $this->generator->generate($this->callbacks, $this->before, $this->after, $name, $params); 179 | } catch (InvalidBreadcrumbException $e) { 180 | if ($origName === null && config('breadcrumbs.missing-route-bound-breadcrumb-exception')) { 181 | $e->setIsRouteBound(); 182 | throw $e; 183 | } 184 | 185 | if ($origName !== null && config('breadcrumbs.invalid-named-breadcrumb-exception')) { 186 | throw $e; 187 | } 188 | 189 | return new Collection; 190 | } 191 | } 192 | 193 | /** 194 | * Render breadcrumbs for a page with the specified view. 195 | * 196 | * @param string $view The name of the view to render. 197 | * @param string|null $name The name of the current page. 198 | * @param mixed ...$params The parameters to pass to the closure for the current page. 199 | * @return \Illuminate\Support\HtmlString The generated HTML. 200 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\InvalidBreadcrumbException if the name is (or any ancestor names are) not registered. 201 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\UnnamedRouteException if no name is given and the current route doesn't have an associated name. 202 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\ViewNotSetException if no view has been set. 203 | */ 204 | public function view(string $view, string $name = null, ...$params): HtmlString 205 | { 206 | $breadcrumbs = $this->generate($name, ...$params); 207 | 208 | // TODO: After dropping support for Laravel 5.8 and below, change this to return the view directly 209 | // https://github.com/laravel/framework/pull/29600 210 | $html = $this->viewFactory->make($view, compact('breadcrumbs'))->render(); 211 | 212 | return new HtmlString($html); 213 | } 214 | 215 | /** 216 | * Render breadcrumbs for a page with the default view. 217 | * 218 | * @param string|null $name The name of the current page. 219 | * @param mixed ...$params The parameters to pass to the closure for the current page. 220 | * @return \Illuminate\Support\HtmlString The generated HTML. 221 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\InvalidBreadcrumbException if the name is (or any ancestor names are) not registered. 222 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\UnnamedRouteException if no name is given and the current route doesn't have an associated name. 223 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\ViewNotSetException if no view has been set. 224 | */ 225 | public function render(string $name = null, ...$params): HtmlString 226 | { 227 | $view = config('breadcrumbs.view'); 228 | 229 | if (!$view) { 230 | throw new ViewNotSetException('Breadcrumbs view not specified (check config/breadcrumbs.php)'); 231 | } 232 | 233 | return $this->view($view, $name, ...$params); 234 | } 235 | 236 | /** 237 | * Get the last breadcrumb for the current page. 238 | * 239 | * Optionally pass a 240 | * 241 | * @return \stdClass|null The breadcrumb for the current page. 242 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\UnnamedRouteException if the current route doesn't have an associated name. 243 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\InvalidBreadcrumbException if the name is (or any ancestor names are) not registered. 244 | */ 245 | public function current(): ?\stdClass 246 | { 247 | return $this->generate()->where('current', '!==', false)->last(); 248 | } 249 | 250 | /** 251 | * Get the current route name and parameters. 252 | * 253 | * This may be the route set manually with the setCurrentRoute() method, but normally is the route retrieved from 254 | * the Laravel Router. 255 | * 256 | * #### Example 257 | * ```php 258 | * [$name, $params] = $this->getCurrentRoute(); 259 | * ``` 260 | * 261 | * @return array A two-element array consisting of the route name (string) and any parameters (array). 262 | * @throws \DaveJamesMiller\Breadcrumbs\Exceptions\UnnamedRouteException if the current route doesn't have an associated name. 263 | */ 264 | protected function getCurrentRoute() 265 | { 266 | // Manually set route 267 | if ($this->route) { 268 | return $this->route; 269 | } 270 | 271 | // Determine the current route 272 | $route = $this->router->current(); 273 | 274 | // No current route - must be the 404 page 275 | if ($route === null) { 276 | return ['errors.404', []]; 277 | } 278 | 279 | // Convert route to name 280 | $name = $route->getName(); 281 | 282 | if ($name === null) { 283 | throw new UnnamedRouteException($route); 284 | } 285 | 286 | // Get the current route parameters 287 | $params = array_values($route->parameters()); 288 | 289 | return [$name, $params]; 290 | } 291 | 292 | /** 293 | * Set the current route name and parameters to use when calling render() or generate() with no parameters. 294 | * 295 | * @param string $name The name of the current page. 296 | * @param mixed ...$params The parameters to pass to the closure for the current page. 297 | * @return void 298 | */ 299 | public function setCurrentRoute(string $name, ...$params): void 300 | { 301 | $this->route = [$name, $params]; 302 | } 303 | 304 | /** 305 | * Clear the previously set route name and parameters to use when calling render() or generate() with no parameters. 306 | * 307 | * Next time it will revert to the default behaviour of using the current route from Laravel. 308 | * 309 | * @return void 310 | */ 311 | public function clearCurrentRoute(): void 312 | { 313 | $this->route = null; 314 | } 315 | } 316 | -------------------------------------------------------------------------------- /classes/BreadcrumbsServiceProvider.php: -------------------------------------------------------------------------------- 1 | mergeConfigFrom(__DIR__ . '/../config/breadcrumbs.php', 'breadcrumbs'); 40 | 41 | // Register Manager class singleton with the app container 42 | $this->app->singleton(BreadcrumbsManager::class, config('breadcrumbs.manager-class')); 43 | 44 | // Register Generator class so it can be overridden 45 | $this->app->bind(BreadcrumbsGenerator::class, config('breadcrumbs.generator-class')); 46 | } 47 | 48 | /** 49 | * Bootstrap the application events. 50 | * 51 | * @return void 52 | */ 53 | public function boot(): void 54 | { 55 | // Register 'breadcrumbs::' view namespace 56 | $this->loadViewsFrom(__DIR__ . '/../views/', 'breadcrumbs'); 57 | 58 | // Publish the config/breadcrumbs.php file 59 | $this->publishes([ 60 | __DIR__ . '/../config/breadcrumbs.php' => config_path('breadcrumbs.php'), 61 | ], 'breadcrumbs-config'); 62 | 63 | // Load the routes/breadcrumbs.php file 64 | $this->registerBreadcrumbs(); 65 | } 66 | 67 | /** 68 | * Load the routes/breadcrumbs.php file (if it exists) which registers available breadcrumbs. 69 | * 70 | * This method can be overridden in a child class. It is called by the boot() method, which Laravel calls 71 | * automatically when bootstrapping the application. 72 | * 73 | * @return void 74 | */ 75 | public function registerBreadcrumbs(): void 76 | { 77 | // Load the routes/breadcrumbs.php file, or other configured file(s) 78 | $files = config('breadcrumbs.files'); 79 | 80 | if (! $files) { 81 | return; 82 | } 83 | 84 | // If it is set to the default value and that file doesn't exist, skip loading it rather than causing an error 85 | if ($files === base_path('routes/breadcrumbs.php') && ! is_file($files)) { 86 | return; 87 | } 88 | 89 | // Support both Breadcrumbs:: and $breadcrumbs-> syntax by making $breadcrumbs variable available 90 | /** @noinspection PhpUnusedLocalVariableInspection */ 91 | $breadcrumbs = $this->app->make(BreadcrumbsManager::class); 92 | 93 | // Support both a single string filename and an array of filenames (e.g. returned by glob()) 94 | foreach ((array) $files as $file) { 95 | require $file; 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /classes/Exceptions/DuplicateBreadcrumbException.php: -------------------------------------------------------------------------------- 1 | name = $name; 25 | } 26 | 27 | public function getSolution(): Solution 28 | { 29 | // Determine the breadcrumbs file name(s) 30 | $files = (array)config('breadcrumbs.files'); 31 | 32 | $basePath = base_path() . DIRECTORY_SEPARATOR; 33 | foreach ($files as &$file) { 34 | $file = Str::replaceFirst($basePath, '', $file); 35 | } 36 | 37 | if (count($files) === 1) { 38 | $description = "Look in `$files[0]` for multiple breadcrumbs named `{$this->name}`."; 39 | } else { 40 | $description = "Look in the following files for multiple breadcrumbs named `{$this->name}`:\n\n- `" . implode("`\n -`", $files) . '`'; 41 | } 42 | 43 | $links = []; 44 | $links['Defining breadcrumbs'] = 'https://github.com/davejamesmiller/laravel-breadcrumbs#defining-breadcrumbs'; 45 | $links['Laravel Breadcrumbs documentation'] = 'https://github.com/davejamesmiller/laravel-breadcrumbs#laravel-breadcrumbs'; 46 | 47 | return BaseSolution::create('Remove the duplicate breadcrumb') 48 | ->setSolutionDescription($description) 49 | ->setDocumentationLinks($links); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /classes/Exceptions/InvalidBreadcrumbException.php: -------------------------------------------------------------------------------- 1 | name = $name; 26 | } 27 | 28 | public function setIsRouteBound() 29 | { 30 | $this->isRouteBound = true; 31 | } 32 | 33 | public function getSolution(): Solution 34 | { 35 | // Determine the breadcrumbs file name 36 | $files = (array)config('breadcrumbs.files'); 37 | 38 | if (count($files) === 1) { 39 | $file = Str::replaceFirst(base_path() . DIRECTORY_SEPARATOR, '', $files[0]); 40 | } else { 41 | $file = 'one of the files defined in config/breadcrumbs.php'; 42 | } 43 | 44 | // Determine the current route name 45 | $route = Route::current(); 46 | $routeName = $route ? $route->getName() : null; 47 | if ($routeName) { 48 | $url = "route('{$this->name}')"; 49 | } else { 50 | $url = "url('" . Request::path() . "')"; 51 | } 52 | 53 | $links = []; 54 | $links['Defining breadcrumbs'] = 'https://github.com/davejamesmiller/laravel-breadcrumbs#defining-breadcrumbs'; 55 | 56 | if ($this->isRouteBound) { 57 | $links['Route-bound breadcrumbs'] = 'https://github.com/davejamesmiller/laravel-breadcrumbs#route-bound-breadcrumbs'; 58 | } 59 | 60 | $links['Silencing breadcrumb exceptions'] = 'https://github.com/davejamesmiller/laravel-breadcrumbs#configuration-file'; 61 | $links['Laravel Breadcrumbs documentation'] = 'https://github.com/davejamesmiller/laravel-breadcrumbs#laravel-breadcrumbs'; 62 | 63 | return BaseSolution::create("Add this to $file") 64 | ->setSolutionDescription(" 65 | ```php 66 | Breadcrumbs::for('{$this->name}', function (\$trail) { 67 | \$trail->push('Title Here', $url); 68 | }); 69 | ```") 70 | ->setDocumentationLinks($links); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /classes/Exceptions/UnnamedRouteException.php: -------------------------------------------------------------------------------- 1 | methods()) . ' /' . ltrim($route->uri(), '/'); 28 | 29 | parent::__construct("The current route ($uri) is not named"); 30 | 31 | $this->route = $route; 32 | } 33 | 34 | public function getSolution(): Solution 35 | { 36 | $method = strtolower(Arr::first($this->route->methods())); 37 | $uri = $this->route->uri(); 38 | $action = $this->route->getActionName(); 39 | 40 | if ($action === '\Illuminate\Routing\ViewController') { 41 | $method = 'view'; 42 | $action = "'" . ($this->route->defaults['view'] ?? 'view-name') . "'"; 43 | } elseif ($action === 'Closure') { 44 | $action = "function() {\n ...\n}"; 45 | } else { 46 | $action = "'" . Str::replaceFirst(App::getNamespace() . 'Http\Controllers\\', '', $action) . "'"; 47 | } 48 | 49 | $links = []; 50 | $links['Route-bound breadcrumbs'] = 'https://github.com/davejamesmiller/laravel-breadcrumbs#route-bound-breadcrumbs'; 51 | $links['Silencing breadcrumb exceptions'] = 'https://github.com/davejamesmiller/laravel-breadcrumbs#configuration-file'; 52 | $links['Laravel Breadcrumbs documentation'] = 'https://github.com/davejamesmiller/laravel-breadcrumbs#laravel-breadcrumbs'; 53 | 54 | return BaseSolution::create('Give the route a name') 55 | ->setSolutionDescription("For example: 56 | 57 | 58 | ```php 59 | Route::$method('$uri', $action)->name('sample-name'); 60 | ```") 61 | ->setDocumentationLinks($links); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /classes/Exceptions/ViewNotSetException.php: -------------------------------------------------------------------------------- 1 | setSolutionDescription("Please check `config/breadcrumbs.php` for a valid `'view'` (e.g. `'breadcrumbs::bootstrap4'`)") 23 | ->setDocumentationLinks($links); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /classes/Facades/Breadcrumbs.php: -------------------------------------------------------------------------------- 1 | =7.1.3", 17 | "facade/ignition-contracts": "^1.0", 18 | "laravel/framework": ">=5.6" 19 | }, 20 | "require-dev": { 21 | "orchestra/testbench": ">=3.6", 22 | "phpunit/phpunit": "^7.0|^8.0", 23 | "php-coveralls/php-coveralls": "^2.0", 24 | "spatie/phpunit-snapshot-assertions": "^2.0" 25 | }, 26 | "minimum-stability": "dev", 27 | "prefer-stable": true, 28 | "autoload": { 29 | "psr-4": { 30 | "DaveJamesMiller\\Breadcrumbs\\": "classes/" 31 | } 32 | }, 33 | "autoload-dev": { 34 | "psr-4": { 35 | "App\\": "tests/", 36 | "BreadcrumbsTests\\": "tests/" 37 | } 38 | }, 39 | "extra": { 40 | "laravel": { 41 | "providers": [ 42 | "DaveJamesMiller\\Breadcrumbs\\BreadcrumbsServiceProvider" 43 | ], 44 | "aliases": { 45 | "Breadcrumbs": "DaveJamesMiller\\Breadcrumbs\\Facades\\Breadcrumbs" 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /config/breadcrumbs.php: -------------------------------------------------------------------------------- 1 | 'breadcrumbs::bootstrap4', 27 | 28 | /* 29 | |-------------------------------------------------------------------------- 30 | | Breadcrumbs File(s) 31 | |-------------------------------------------------------------------------- 32 | | 33 | | The file(s) where breadcrumbs are defined. e.g. 34 | | 35 | | - base_path('routes/breadcrumbs.php') 36 | | - glob(base_path('breadcrumbs/*.php')) 37 | | 38 | */ 39 | 40 | 'files' => base_path('routes/breadcrumbs.php'), 41 | 42 | /* 43 | |-------------------------------------------------------------------------- 44 | | Exceptions 45 | |-------------------------------------------------------------------------- 46 | | 47 | | Determine when to throw an exception. 48 | | 49 | */ 50 | 51 | // When route-bound breadcrumbs are used but the current route doesn't have a name (UnnamedRouteException) 52 | 'unnamed-route-exception' => true, 53 | 54 | // When route-bound breadcrumbs are used and the matching breadcrumb doesn't exist (InvalidBreadcrumbException) 55 | 'missing-route-bound-breadcrumb-exception' => true, 56 | 57 | // When a named breadcrumb is used but doesn't exist (InvalidBreadcrumbException) 58 | 'invalid-named-breadcrumb-exception' => true, 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | Classes 63 | |-------------------------------------------------------------------------- 64 | | 65 | | Subclass the default classes for more advanced customisations. 66 | | 67 | */ 68 | 69 | // Manager 70 | 'manager-class' => DaveJamesMiller\Breadcrumbs\BreadcrumbsManager::class, 71 | 72 | // Generator 73 | 'generator-class' => DaveJamesMiller\Breadcrumbs\BreadcrumbsGenerator::class, 74 | 75 | ]; 76 | -------------------------------------------------------------------------------- /views/bootstrap2.blade.php: -------------------------------------------------------------------------------- 1 | @if (count($breadcrumbs)) 2 | 3 | 29 | 30 | @endif 31 | -------------------------------------------------------------------------------- /views/bootstrap3.blade.php: -------------------------------------------------------------------------------- 1 | @if (count($breadcrumbs)) 2 | 3 | 14 | 15 | @endif 16 | -------------------------------------------------------------------------------- /views/bootstrap4.blade.php: -------------------------------------------------------------------------------- 1 | @if (count($breadcrumbs)) 2 | 3 | 14 | 15 | @endif 16 | -------------------------------------------------------------------------------- /views/bulma.blade.php: -------------------------------------------------------------------------------- 1 | @if (count($breadcrumbs)) 2 | 3 | 24 | 25 | @endif 26 | -------------------------------------------------------------------------------- /views/foundation6.blade.php: -------------------------------------------------------------------------------- 1 | @if (count($breadcrumbs)) 2 | 3 | 18 | 19 | @endif 20 | -------------------------------------------------------------------------------- /views/json-ld.php: -------------------------------------------------------------------------------- 1 | 'http://schema.org', 7 | '@type' => 'BreadcrumbList', 8 | 'itemListElement' => [], 9 | ]; 10 | 11 | foreach ($breadcrumbs as $i => $breadcrumb) { 12 | $json['itemListElement'][] = [ 13 | '@type' => 'ListItem', 14 | 'position' => $i + 1, 15 | 'item' => [ 16 | '@id' => $breadcrumb->url ?: Request::fullUrl(), 17 | 'name' => $breadcrumb->title, 18 | 'image' => $breadcrumb->image ?? null, 19 | ], 20 | ]; 21 | } 22 | ?> 23 | 24 | -------------------------------------------------------------------------------- /views/materialize.blade.php: -------------------------------------------------------------------------------- 1 | @if (count($breadcrumbs)) 2 | 3 | 18 | 19 | @endif 20 | -------------------------------------------------------------------------------- /views/uikit.blade.php: -------------------------------------------------------------------------------- 1 | @if (count($breadcrumbs)) 2 | 13 | @endif 14 | --------------------------------------------------------------------------------