wish_report.blade.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. @extends('backend.layouts.app')
  2. @section('content')
  3. <!--<div class="aiz-titlebar text-left mt-2 mb-3">-->
  4. <!-- <div class=" align-items-center">-->
  5. <!-- <h1 class="h3">{{translate('Product Wish Report')}}</h1>-->
  6. <!-- </div>-->
  7. <!--</div>-->
  8. <div class="row">
  9. <div class="col-md-8 mx-auto" style="flex: 0 0 100%;max-width: 100%;">
  10. <div class="card">
  11. <div class="card-body">
  12. <form action="{{ route('wish_report.index') }}" method="GET">
  13. <div class="form-group row offset-lg-2">
  14. <label class="col-md-3 col-form-label">{{ translate('Sort by Category') }}:</label>
  15. <div class="col-md-5">
  16. <select id="demo-ease" class="from-control aiz-selectpicker" name="category_id" required>
  17. @foreach (\App\Models\Category::all() as $key => $category)
  18. <option value="{{ $category->id }}" @if($category->id == $sort_by) selected @endif>{{ $category->getTranslation('name') }}</option>
  19. @endforeach
  20. </select>
  21. </div>
  22. <div class="col-md-2">
  23. <button class="btn btn-primary" type="submit">{{ translate('Filter') }}</button>
  24. </div>
  25. </div>
  26. </form>
  27. <table class="table table-bordered aiz-table mb-0">
  28. <thead>
  29. <tr>
  30. <th>{{ translate('Product Name') }}</th>
  31. <th>{{ translate('Number of Wish') }}</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. @foreach ($products as $key => $product)
  36. @if($product->wishlists != null)
  37. <tr>
  38. <td>{{ $product->getTranslation('name') }}</td>
  39. <td>{{ $product->wishlists->count() }}</td>
  40. </tr>
  41. @endif
  42. @endforeach
  43. </tbody>
  44. </table>
  45. <div class="aiz-pagination mt-4">
  46. {{ $products->links() }}
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. @endsection