From 54abaccb3a7e97de2301a8f29af832dce0cf462d Mon Sep 17 00:00:00 2001 From: Benjamin Takats Date: Thu, 15 Dec 2022 19:28:50 +0100 Subject: [PATCH] switch year --- app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php b/app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php index 3b17e63d..b0bdd83e 100644 --- a/app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php +++ b/app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php @@ -14,6 +14,13 @@ class BitcoinEventTable extends Component protected $queryString = ['year']; + public function mount() + { + if (!$this->year) { + $this->year = now()->year; + } + } + public function render() { return view('livewire.bitcoin-event.bitcoin-event-table', [