├── .editorconfig ├── .gitignore ├── LICENSE ├── README.md ├── composer.json └── src ├── BreadcrumbsServiceProvider.php └── Facades └── Breadcrumbs.php /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 4 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | composer.phar 3 | composer.lock 4 | .DS_Store 5 | *.sublime-project 6 | *.sublime-workspace 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 CreITive 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Latest Stable Version](https://poser.pugx.org/creitive/laravel5-breadcrumbs/version.png)](https://packagist.org/packages/creitive/laravel5-breadcrumbs) [![Total Downloads](https://poser.pugx.org/creitive/laravel5-breadcrumbs/d/total.png)](https://packagist.org/packages/creitive/laravel5-breadcrumbs) 2 | 3 | Laravel 5 Breadcrumbs 4 | ===================== 5 | 6 | *A simple Laravel 5-compatible breadcrumbs package. Generates Twitter Bootstrap-compatible output.* 7 | 8 | 9 | Installation 10 | ------------ 11 | 12 | Just run this on the command line: 13 | 14 | ``` 15 | composer require creitive/laravel5-breadcrumbs 16 | ``` 17 | 18 | Laravel 5.5+ will use the auto-discovery function. 19 | 20 | If using Laravel 5.4 (or if you don't use auto-discovery) you will need to include the service providers / facade in `config/app.php`. 21 | 22 | ```php 23 | return array( 24 | // ... 25 | 26 | 'providers' => array( 27 | // ... 28 | 29 | Creitive\Breadcrumbs\BreadcrumbsServiceProvider::class, 30 | ), 31 | 32 | // ... 33 | 34 | 'aliases' => array( 35 | // ... 36 | 37 | 'Breadcrumbs' => Creitive\Breadcrumbs\Facades\Breadcrumbs::class, 38 | ), 39 | ); 40 | ``` 41 | 42 | You're all set! 43 | 44 | 45 | Usage 46 | ----- 47 | 48 | For usage documentation, please visit the core library that this package depends on: [creitive/breadcrumbs](https://github.com/creitive/breadcrumbs). 49 | 50 | This particular package registers a shared instance of the breadcrumbs class, and enables you to make the calls on the provided facade, ie. instead of doing `$breadcrumbs->addCrumb('Home', '/')`, you can do `\Breadcrumbs::addCrumb('Home', '/')`. 51 | 52 | Additionally, having this as a separate package enables us to move forward with Laravel-specific features, such as having a configuration file that enables you to more cleanly customize how the package works. 53 | 54 | 55 | Laravel 4 56 | --------- 57 | 58 | For Laravel 4 support, visit the [creitive/laravel4-breadcrumbs](https://github.com/creitive/laravel4-breadcrumbs) package. 59 | 60 | 61 | Laravel 6 62 | --------- 63 | 64 | For Laravel 6 support, visit the [creitive/laravel6-breadcrumbs](https://github.com/creitive/laravel6-breadcrumbs) package. 65 | 66 | 67 | Laravel 7+ 68 | --------- 69 | 70 | For Laravel 7+ support, visit the [creitive/laravel-breadcrumbs](https://github.com/creitive/laravel-breadcrumbs) package. 71 | 72 | 73 | License 74 | ------- 75 | 76 | The code is licensed under the MIT license, which is available in the `LICENSE` file. 77 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "creitive/laravel5-breadcrumbs", 3 | "description": "Breadcrumbs integration for Laravel 5", 4 | "keywords":[ 5 | "laravel", 6 | "breadcrumbs" 7 | ], 8 | "homepage":"https://github.com/creitive/laravel5-breadcrumbs", 9 | "authors": [ 10 | { 11 | "name": "Milos Levacic", 12 | "email": "milos.levacic@creitive.com" 13 | } 14 | ], 15 | "license": "MIT", 16 | "require": { 17 | "php": ">=5.4.0", 18 | "creitive/breadcrumbs": "^3.0", 19 | "illuminate/support": "~5.0" 20 | }, 21 | "autoload": { 22 | "psr-4": { 23 | "Creitive\\Breadcrumbs\\": "src" 24 | } 25 | }, 26 | "extra": { 27 | "laravel": { 28 | "providers": [ 29 | "Creitive\\Breadcrumbs\\BreadcrumbsServiceProvider" 30 | ], 31 | "aliases": { 32 | "Breadcrumbs": "Creitive\\Breadcrumbs\\Facades\\Breadcrumbs" 33 | } 34 | } 35 | }, 36 | "minimum-stability": "dev" 37 | } 38 | -------------------------------------------------------------------------------- /src/BreadcrumbsServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->singleton('breadcrumbs', function ($app) { 18 | return new Breadcrumbs(); 19 | }); 20 | 21 | $this->app->alias('breadcrumbs', 'Creitive\Breadcrumbs\Breadcrumbs'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Facades/Breadcrumbs.php: -------------------------------------------------------------------------------- 1 |