50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: merdan
|
|
* Date: 9/11/2019
|
|
* Time: 15:07
|
|
*/
|
|
// Home
|
|
Breadcrumbs::for('home', function ($trail) {
|
|
$trail->push(trans('ClientSide.home'), route('home'));
|
|
});
|
|
|
|
Breadcrumbs::for('category', function ($trail, $category){
|
|
$trail->parent('home');
|
|
|
|
if(!empty($category) && $category->parent_id){
|
|
$parent = $category->parent;
|
|
$trail->push($parent->title ?? '#title_transation', $parent->url?? '#');
|
|
}
|
|
$trail->push($category->title?? 'No translation', $category->url ?? '#');
|
|
});
|
|
|
|
Breadcrumbs::for('event',function($trail, $event){
|
|
if($event->subCategory)
|
|
$trail->parent('category', $event->subCategory);
|
|
else
|
|
$trail->parent('category', $event->mainCategory);
|
|
$trail->push($event->title?? '#title_transation',$event->event_url ?? '#');
|
|
});
|
|
|
|
Breadcrumbs::for('seats',function ($trail,$event){
|
|
$trail->parent('event',$event);
|
|
$trail->push(trans('ClientSide.checkout'));//'Pokupka'
|
|
});
|
|
|
|
Breadcrumbs::for('search',function($trail){
|
|
$trail->parent('home');
|
|
$trail->push(trans('ClientSide.results'));//'Результат поиска'
|
|
});
|
|
|
|
Breadcrumbs::for('add_event',function($trail){
|
|
$trail->parent('home');
|
|
$trail->push('+ ДОБАВИТЬ СОБЫТИЕ');
|
|
});
|
|
|
|
Breadcrumbs::for('about',function($trail,$title){
|
|
$trail->parent('home');
|
|
$trail->push($title??'#title_transation');
|
|
});
|