Skip to content

v7.0.0

Compare
Choose a tag to compare
@shengslogar shengslogar released this 23 May 16:58
· 63 commits to main since this release

Chainable calls are here! Combined with arrow functions in PHP 7.4, you can now use the following elegant syntax:

<?php

use Diglactic\Breadcrumbs\Breadcrumbs;
use Diglactic\Breadcrumbs\Generator as BreadcrumbTrail;

Breadcrumbs::for(
    'post',
    fn (BreadcrumbTrail $trail, Post $post) => $trail
        ->parent('blog')
        ->push($post->title, route('post', $post))
);

Thanks to @tabuna for the original PR.

7.x also introduces some breaking housekeeping changes. Take a moment to review the upgrade guide.