table-options.blade.php 1.2 KB

1234567891011121314151617181920212223242526
  1. <form method="GET" class="top-filter">
  2. <div class="filter-show">
  3. <label class="filter-label">Show :</label>
  4. <select class="form-select filter-select" name="limit" onchange="$(this).closest('form').submit()" id="limit-select">
  5. @foreach([12, 24, 36] as $limit)
  6. <option value="{{ $limit }}" {{ request('limit') == $limit ? 'selected' : '' }}>{{ $limit }}</option>
  7. @endforeach
  8. </select>
  9. <input type="hidden" name="page" value="1">
  10. </div>
  11. <div class="filter-short">
  12. <label class="filter-label">Short by :</label>
  13. <select class="form-select filter-select" id="sort-select" name="sort" onchange="$(this).closest('form').submit()">
  14. @foreach($filterOptions ?? [
  15. ['Value' => 'mx.created_on desc', 'Caption' => '최신순'],
  16. ['Value' => 'mx.created_on asc', 'Caption' => '역순'],
  17. ] as $option)
  18. <option value="{{ $option['Value'] }}" {{ request('sort') == $option['Value'] ? 'selected' : '' }}>{{ $option['Caption'] }}</option>
  19. @endforeach
  20. </select>
  21. </div>
  22. {{ $slot }}
  23. </form>