diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index 608201f8..445316e2 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -55,8 +55,8 @@ class PublicController extends Controller $locale = Config::get('app.locale'); $category = Category::select('id',"title_{$locale}") - ->with(['children'=>function($q) use($data){ - $q->select('id','parent_id','events_limit','view_type'); + ->with(['children'=>function($q) use($data,$locale){ + $q->select('id','parent_id','events_limit','view_type',"title_{$locale}"); $q->whereHas('cat_events', function ($query) use($data){ $query->onLive($data['start'], $data['end']); diff --git a/resources/views/mobile/Pages/EventsPage.blade.php b/resources/views/mobile/Pages/EventsPage.blade.php index 2f300f74..3a69ebad 100644 --- a/resources/views/mobile/Pages/EventsPage.blade.php +++ b/resources/views/mobile/Pages/EventsPage.blade.php @@ -8,20 +8,24 @@ @endsection @section('content') @foreach($category->children as $cat) - + @php + $cat_events = $events->where('sub_category_id',$cat->id); + @endphp
{{$cat->title}}
+ @if($cat_events->count() == $cat->events_limit) {{__("ClientSide.rep")}} + @endif
@include("Shared.Partials.FilterMenu")