Skip to content

Commit 225c2db

Browse files
committed
fix: update getModel() method signature for Filament v4 compatibility
- Fix method signature incompatibility in SolutionForest\FilamentTree\Actions\Action::getModel() - Add missing parameter: bool $withDefault = true - Change return type from string to ?string to match parent class - Resolves PHP Fatal Error: "Declaration of getModel(): string must be compatible with Filament\Actions\Action::getModel(bool $withDefault = true): ?string" Fixes #78
1 parent 6f95b56 commit 225c2db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Actions/Action.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function getPluralModelLabel(): string
6363
return $this->getCustomPluralModelLabel() ?? $this->getTree()->getPluralModelLabel();
6464
}
6565

66-
public function getModel(bool $withDefault = true): string
66+
public function getModel(bool $withDefault = true): ?string
6767
{
6868
return $this->getCustomModel() ?? $this->getLivewire()->getModel();
6969
}

0 commit comments

Comments
 (0)