From 3050d8870a98d68199429e9a00497dbd93a14fdc Mon Sep 17 00:00:00 2001 From: afolabi legunsen Date: Mon, 9 Oct 2023 10:29:44 +0100 Subject: [PATCH 1/3] Add support for livewire 3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ebcb430..ed703f9 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": "^8.0|^8.1|^8.2", - "livewire/livewire": "^2.11", + "livewire/livewire": "^3.0", "spatie/laravel-package-tools": "^1.0.0" }, "require-dev": { From 349ac0956013525951af700b04adc015232db166 Mon Sep 17 00:00:00 2001 From: afolabi legunsen Date: Tue, 10 Oct 2023 02:34:34 +0100 Subject: [PATCH 2/3] Removed PHP 8.0 from requirements Livewire 3 requires a minimum of PHP 8.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ed703f9..c5fcfcd 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": "^8.0|^8.1|^8.2", + "php": "^8.1|^8.2", "livewire/livewire": "^3.0", "spatie/laravel-package-tools": "^1.0.0" }, From 0ed0d073ee536e7ce6d10e1c2701dda0f44ef7ad Mon Sep 17 00:00:00 2001 From: afolabi legunsen Date: Tue, 10 Oct 2023 02:54:34 +0100 Subject: [PATCH 3/3] Update AdReportComponent.php Changed $this->emit() to $this->dispatch() --- src/Http/Livewire/AdReportComponent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Livewire/AdReportComponent.php b/src/Http/Livewire/AdReportComponent.php index 2c885a9..2780ab4 100644 --- a/src/Http/Livewire/AdReportComponent.php +++ b/src/Http/Livewire/AdReportComponent.php @@ -72,7 +72,7 @@ public function calculateClicksReport(){ $this->clicksPerAd = collect($this->clicksPerAd)->sortByDesc('clicks')->values()->all(); - $this->emit('renderChart'); + $this->dispatch('renderChart'); }