tampilan paket foto
This commit is contained in:
parent
cda7716cfa
commit
3f5133a285
|
@ -16,7 +16,7 @@ class PaketFotoPage extends Component
|
|||
use WithPagination;
|
||||
|
||||
#[Url]
|
||||
public $sort = 'latest';
|
||||
public $sort = 'oldest';
|
||||
|
||||
// tambah
|
||||
//public function addToCart($paketfoto_id){
|
||||
|
@ -33,6 +33,9 @@ public function render()
|
|||
->when($this->sort === 'latest', function($query) {
|
||||
return $query->latest();
|
||||
})
|
||||
->when($this->sort === 'oldest', function($query) {
|
||||
return $query->oldest();
|
||||
})
|
||||
->paginate(6);
|
||||
|
||||
return view('livewire.paket-foto-page', [
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<div class="items-center justify-between hidden px-3 py-2 bg-gray-100 md:flex dark:bg-gray-900 ">
|
||||
<div class="flex items-center justify-between">
|
||||
<select wire:model.live="sort" id="" class="block w-40 text-base bg-gray-100 cursor-pointer dark:text-gray-400 dark:bg-gray-900">
|
||||
<option value="oldest">Terlama</option>
|
||||
<option value="latest">Terbaru</option>
|
||||
<option value="price">Harga</option>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue