Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/log1x/crumb

A simple breadcrumb package for Sage 10.
https://github.com/log1x/crumb

acorn breadcrumb laravel roots sage sage10 wordpress

Last synced: about 6 hours ago
JSON representation

A simple breadcrumb package for Sage 10.

Awesome Lists containing this project

README

        

# Crumb

![Latest Stable Version](https://img.shields.io/packagist/v/log1x/crumb?style=flat-square)
![Build Status](https://img.shields.io/github/actions/workflow/status/log1x/crumb/main.yml?branch=master&style=flat-square)
![Total Downloads](https://img.shields.io/packagist/dt/log1x/crumb?style=flat-square)

A simple breadcrumb package for Sage 10.

## Requirements

- [Sage](https://github.com/roots/sage) >= 10.0
- [PHP](https://secure.php.net/manual/en/install.php) >= 7.4
- [Composer](https://getcomposer.org/download/)

## Installation

Install via Composer:

```bash
$ composer require log1x/crumb
```

## Usage

Publish the breadcrumb configuration file using Acorn:

```sh
$ wp acorn vendor:publish --provider="Log1x\Crumb\CrumbServiceProvider"
```

### Example

```php
# app/View/Components/Breadcrumb.php

toArray();
}

/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\View\View|string
*/
public function render()
{
return $this->view('components.breadcrumb');
}
}
```

```php
# views/components/breadcrumb.blade.php

@if (! empty($items))

@foreach ($items as $item)
@if (empty($item['url']))

{{ $item['label'] }}

@else



@if ($loop->first)


{!! $item['label'] !!}
@else
{!! $item['label'] !!}
@endif


@if (!$loop->last)



@endif
@endif
@endforeach

@endif
```

## Bug Reports

If you discover a bug in Crumb, please [open an issue](https://github.com/log1x/crumb/issues).

## Contributing

Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.

## License

Crumb is provided under the [MIT License](https://github.com/log1x/crumb/blob/master/LICENSE.md).