Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kematjaya0/breadcrumb-bundle
https://github.com/kematjaya0/breadcrumb-bundle
breadcrumb breadcrumbs library symfony symfony-bundle symfony4 symfony5
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kematjaya0/breadcrumb-bundle
- Owner: kematjaya0
- Created: 2020-04-18T14:28:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-31T10:18:29.000Z (almost 4 years ago)
- Last Synced: 2024-10-04T13:07:09.205Z (about 1 month ago)
- Topics: breadcrumb, breadcrumbs, library, symfony, symfony-bundle, symfony4, symfony5
- Language: PHP
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Breadcrumb for Symfony 4 and Symfony 5
1. instalation
```
composer require kematjaya/breadcrumb-bundle
```
2. update config/bundles.php
```
Kematjaya\Breadcrumb\KmjBreadcrumbBundle::class => ['all' => true]
```
3. usage in controller
```
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Kematjaya\Breadcrumb\Lib\Builder as BreacrumbBuilder;
use Symfony\Component\Routing\Annotation\Route;
/**
* @Route("/item")
*/
class MyController extends AbstractController
{
/**
* @Route("/", name="item_index")
*/
public function index(BreacrumbBuilder $builder)
{
$builder->add('item');
....
}
/**
* @Route("/create", name="item_create")
*/
public function create(BreacrumbBuilder $builder)
{
$builder->add('item', 'item_index');
$builder->add('create');
...
}
}
```
4. use in twig
```
{{ kmj_breadcrumb() }}
```