Skip to content

Commit

Permalink
breadcrumbs component
Browse files Browse the repository at this point in the history
  • Loading branch information
devilstars committed May 31, 2021
1 parent 169078f commit 8d02c9e
Show file tree
Hide file tree
Showing 6 changed files with 326 additions and 115 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"diglactic/laravel-breadcrumbs": "^7.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
Expand Down
179 changes: 125 additions & 54 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 77 additions & 0 deletions config/breadcrumbs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| View Name
|--------------------------------------------------------------------------
|
| Choose a view to display when Breadcrumbs::render() is called.
| Built in templates are:
|
| - 'breadcrumbs::bootstrap5' - Bootstrap 5
| - 'breadcrumbs::bootstrap4' - Bootstrap 4
| - 'breadcrumbs::bootstrap3' - Bootstrap 3
| - 'breadcrumbs::bootstrap2' - Bootstrap 2
| - 'breadcrumbs::bulma' - Bulma
| - 'breadcrumbs::foundation6' - Foundation 6
| - 'breadcrumbs::json-ld' - JSON-LD Structured Data
| - 'breadcrumbs::materialize' - Materialize
| - 'breadcrumbs::tailwind' - Tailwind CSS
| - 'breadcrumbs::uikit' - UIkit
|
| Or a custom view, e.g. '_partials/breadcrumbs'.
|
*/

'view' => 'components.global.breadcrumbs',

/*
|--------------------------------------------------------------------------
| Breadcrumbs File(s)
|--------------------------------------------------------------------------
|
| The file(s) where breadcrumbs are defined. e.g.
|
| - base_path('routes/breadcrumbs.php')
| - glob(base_path('breadcrumbs/*.php'))
|
*/

'files' => base_path('routes/breadcrumbs.php'),

/*
|--------------------------------------------------------------------------
| Exceptions
|--------------------------------------------------------------------------
|
| Determine when to throw an exception.
|
*/

// When route-bound breadcrumbs are used but the current route doesn't have a name (UnnamedRouteException)
'unnamed-route-exception' => true,

// When route-bound breadcrumbs are used and the matching breadcrumb doesn't exist (InvalidBreadcrumbException)
'missing-route-bound-breadcrumb-exception' => true,

// When a named breadcrumb is used but doesn't exist (InvalidBreadcrumbException)
'invalid-named-breadcrumb-exception' => true,

/*
|--------------------------------------------------------------------------
| Classes
|--------------------------------------------------------------------------
|
| Subclass the default classes for more advanced customisations.
|
*/

// Manager
'manager-class' => Diglactic\Breadcrumbs\Manager::class,

// Generator
'generator-class' => Diglactic\Breadcrumbs\Generator::class,

];
Loading

0 comments on commit 8d02c9e

Please sign in to comment.