From 661ea0f1dfa24932d0f9c1f26cffc84e533950f5 Mon Sep 17 00:00:00 2001 From: Shuvro Roy Date: Tue, 22 Feb 2022 11:12:22 +0600 Subject: [PATCH 1/4] chore: update readme --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 0d528a4..430f7ff 100644 --- a/readme.md +++ b/readme.md @@ -11,7 +11,7 @@ Easy Excel exports for Filament Admin. Install via Composer. This will download the package and [Laravel Excel](https://laravel-excel.com/). -**Requires PHP > 8.1 and Filament > 2.0** +**Requires PHP 8.0 and Filament 2.0** ```bash composer require pxlrbt/filament-excel @@ -33,12 +33,12 @@ use Filament\Resources\Resource; use Filament\Resources\Table; class User extends Resource -{ +{ public static function table(Table $table): Table { return $table ->columns([ - // + // ]) ->bulkActions([ ExportAction::make('export') From f1f4f24740f0f41619ae6d51c4ba9917d02754ac Mon Sep 17 00:00:00 2001 From: Dennis Koch Date: Tue, 22 Feb 2022 13:56:13 +0100 Subject: [PATCH 2/4] Update readme.md --- readme.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/readme.md b/readme.md index 430f7ff..686bcd6 100644 --- a/readme.md +++ b/readme.md @@ -17,6 +17,13 @@ Install via Composer. This will download the package and [Laravel Excel](https:/ composer require pxlrbt/filament-excel ``` +### Laravel 9 + +If composer require fails on Laravel 9 because of the simple-cache dependency, you will have to specify the psr/simple-cache version as ^1.0 in your composer.json to satisfy the PhpSpreadsheet dependency. You can install both at the same time as: + +```bash +composer require psr/simple-cache:^1.0 pxlrbt/filament-excel +``` ## Usage From 8eabdee2b602a13f397fa408beb3be1389e4299d Mon Sep 17 00:00:00 2001 From: Dennis Koch Date: Tue, 10 May 2022 09:59:38 +0200 Subject: [PATCH 3/4] fix: Name collision with Filament v2.12 Fixes #9 --- src/Concerns/Except.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Concerns/Except.php b/src/Concerns/Except.php index ed1eb9a..d3d3711 100644 --- a/src/Concerns/Except.php +++ b/src/Concerns/Except.php @@ -4,17 +4,17 @@ trait Except { - protected ?array $except = null; + protected ?array $exceptColumns = null; public function except(array|string $columns): self { - $this->except = is_array($columns) ? $columns : func_get_args(); + $this->exceptColumns = is_array($columns) ? $columns : func_get_args(); return $this; } public function getExcept(): ?array { - return $this->except; + return $this->exceptColumns; } } From f00f73aa3e4ada96b9538397ba6e66a7638a713b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20St=C4=99pie=C5=84?= Date: Wed, 15 Jun 2022 23:14:15 +0200 Subject: [PATCH 4/4] fix: set $records to Collection | Closure | null --- src/Actions/ExportAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Actions/ExportAction.php b/src/Actions/ExportAction.php index 7565b4d..0880c95 100644 --- a/src/Actions/ExportAction.php +++ b/src/Actions/ExportAction.php @@ -41,7 +41,7 @@ class ExportAction extends BulkAction implements FromCollection, WithCustomChunk protected ?string $model; - protected ?Collection $records; + protected Collection | Closure | null $records; protected function setUp(): void {