2019-09-11 14:33:07 +00:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Created by PhpStorm.
|
|
|
|
|
* User: merdan
|
|
|
|
|
* Date: 9/11/2019
|
|
|
|
|
* Time: 15:07
|
|
|
|
|
*/
|
|
|
|
|
// Home
|
|
|
|
|
Breadcrumbs::for('home', function ($trail) {
|
|
|
|
|
$trail->push('Home', route('home'));
|
2019-09-14 12:27:41 +00:00
|
|
|
});
|
|
|
|
|
|
2019-09-16 13:30:51 +00:00
|
|
|
Breadcrumbs::for('category', function ($trail, $category){
|
2019-09-14 12:27:41 +00:00
|
|
|
$trail->parent('home');
|
2019-09-16 13:30:51 +00:00
|
|
|
|
|
|
|
|
if(!empty($category) && $category->parent_id){
|
|
|
|
|
$parent = $category->parent;
|
|
|
|
|
$trail->push($parent->title,$parent->url);
|
|
|
|
|
}
|
|
|
|
|
$trail->push($category->title ?? 'Events', $category->url ?? '#');
|
2019-09-14 12:27:41 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Breadcrumbs::for('event',function($trail, $event){
|
2019-09-23 10:35:40 +00:00
|
|
|
$trail->parent('category', $event->mainCategory);
|
2020-02-10 13:01:36 +00:00
|
|
|
$trail->push($event->title??$event->title_ru,$event->event_url);
|
2019-09-16 12:55:29 +00:00
|
|
|
});
|
|
|
|
|
|
2019-11-02 10:32:23 +00:00
|
|
|
Breadcrumbs::for('seats',function ($trail,$event){
|
|
|
|
|
$trail->parent('event',$event);
|
2020-02-12 11:00:54 +00:00
|
|
|
$trail->push(trans('ClientSide.checkout'));//'Pokupka'
|
2019-11-02 10:32:23 +00:00
|
|
|
});
|
|
|
|
|
|
2019-09-16 12:55:29 +00:00
|
|
|
Breadcrumbs::for('search',function($trail){
|
|
|
|
|
$trail->parent('home');
|
2020-02-12 11:00:54 +00:00
|
|
|
$trail->push(trans('ClientSide.results'));//'Результат поиска'
|
2019-09-16 12:55:29 +00:00
|
|
|
});
|
|
|
|
|
|