Closed precamp-io closed 2 years ago
__
is the name of a function. You can inject that into Breadcrumbs (or anywhere else in your Laravel project) like this:
Breadcrumbs::for('projects.index', function (BreadcrumbTrail $trail): void {
$trail->push(__('Projects'), route('projects.index'));
});
Thanks for building such and amazing addition. I am using translation in my project like this {{__('Projects')}} how would this be incorporated so that breadcrumbs can take translations into consideration? {{ Breadcrumbs::render() }}
Breadcrumbs::for('projects.index', function (BreadcrumbTrail $trail): void { $trail->push('Projects', route('projects.index')); });