added search by category

Cette révision appartient à :
Ibrahim Khalil Shakil 2023-12-26 00:04:22 +06:00
Parent 57192c2430
révision 31a846e284

Voir le fichier

@ -70,19 +70,23 @@
!$selectedCategoryId ? 'checked' : '' }}> <label> All </label>
</div>
<p class="check-details">
1,54,750
{{ $course->count() }}
</p>
</div>
@forelse($category as $cat)
@php
// Fetch the count of courses for each category
$courseCount = $cat->course()->count();
@endphp
<div class="accordion-body__item">
<div class="check-box">
<input type="checkbox" class="checkbox-primary" name="category"
value="{{ $cat->id }}" {{ $selectedCategoryId==$cat->id
? 'checked' : '' }}>
value="{{ $cat->id }}" {{$selectedCategoryId==$cat->id ? 'checked' :
''}}>
<label> {{$cat->category_name}} </label>
</div>
<p class="check-details">
45,770
{{$courseCount}}
</p>
</div>
@empty