src/Maxfactor.php
public static function bake($seed = [], bool $timetravel = true)
    {
        $future = false;

        $bread = collect($seed)->map(function ($crumb) use (&$future, $timetravel) {
            if (!$crumb) {
                return;
            }

            $status = $future && !$timetravel ? 'disabled' : 'enabled';
            $future = ($currentCrumb = (url()->full() === array_get($crumb, 'url')) ? 'current' : '') || $future;

            $crumb['status'] = $currentCrumb ? : $status;

            return $crumb;
        });

        return $bread;
    }
public static function bake($seed = [], bool $timetravel = true)
    {
        $future = false;

        $bread = collect($seed)->map(function ($crumb) use (&$future, $timetravel) {
            if (!$crumb) {
                return;
            }

            $status = $future && !$timetravel ? 'disabled' : 'enabled';
            $future = ($currentCrumb = (url()->full() === array_get($crumb, 'url')) ? 'current' : '') || $future;

            $crumb['status'] = $currentCrumb ? : $status;

            return $crumb;
        });

        return $bread;
    }
public static function bake ( $ seed = [ ] , bool $ timetravel = true ) { $ future = false ; $ bread = collect ( $ seed ) -> map ( function ( $ crumb ) use ( & $ future , $ timetravel ) { if ( ! $ crumb ) { return ; } $ status = $ future && ! $ timetravel ? 'disabled' : 'enabled' ; $ future = ( $ currentCrumb = ( url ( ) -> full ( ) === array_get ( $ crumb , 'url' ) ) ? 'current' : '' ) || $ future ; $ crumb [ 'status' ] = $ currentCrumb ? : $ status ; return $ crumb ; } ) ; return $ bread ; }
Generate a Breadcrumb navigation trail. Set time travel to false to disable
forward navigation. Useful in Checkout for example.

@param boolean $timetravel
@return Array|Collection
Generate a Breadcrumb navigation trail . Set time travel to false to disable forward navigation . Useful in Checkout for example .