home page mobile changed

This commit is contained in:
merdan 2020-03-28 14:54:31 +05:00
parent b6cc2da536
commit 1e206e0bd1
2 changed files with 6 additions and 4 deletions

View File

@ -52,17 +52,19 @@ class PublicController extends Controller
[$order, $data] = $this->sorts_filters();
$category = Category::select('id','title_tk','title_ru')
->with(['children' => function($query) use($data){
->with(['children' => function($query) use($data,$order){
$query->whereHas('cat_events',
function ($query) use($data){
$query->onLive($data['start'], $data['end']);
});
$query->withLiveEvents($order, $data['start'], $data['end'])
}])
->findOrFail($cat_id);
dd($category);
$data['category'] = $category;
// $sub_cats = $category->children->first
$data['sub_cats'] = $category->children()
->withLiveEvents($order, $data['start'], $data['end'], $category->events_limit)//wiered
->whereHas('cat_events',
@ -170,7 +172,7 @@ class PublicController extends Controller
->orderBy('venue_name_'.Config::get('app.locale'),'ASC')
->get();
$data['current'] = $id ? $data['venues']->where('id',$id)->first(): $data['venues']->first();
$data['current'] = $id ? $data['venues']->where('id',$id)->first() ?? $data['venues']->first(): $data['venues']->first();
return $this->render('Pages.VenuesPage',$data);
}

View File

@ -38,7 +38,7 @@
</div>
</div>
<div class="row">
<div class="row mt-5">
<div class="col-12">
<div class="google-maps content" id="map" style="height: 250px">
</div>