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> !$selectedCategoryId ? 'checked' : '' }}> <label> All </label>
</div> </div>
<p class="check-details"> <p class="check-details">
1,54,750 {{ $course->count() }}
</p> </p>
</div> </div>
@forelse($category as $cat) @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="accordion-body__item">
<div class="check-box"> <div class="check-box">
<input type="checkbox" class="checkbox-primary" name="category" <input type="checkbox" class="checkbox-primary" name="category"
value="{{ $cat->id }}" {{ $selectedCategoryId==$cat->id value="{{ $cat->id }}" {{$selectedCategoryId==$cat->id ? 'checked' :
? 'checked' : '' }}> ''}}>
<label> {{$cat->category_name}} </label> <label> {{$cat->category_name}} </label>
</div> </div>
<p class="check-details"> <p class="check-details">
45,770 {{$courseCount}}
</p> </p>
</div> </div>
@empty @empty