From 1b960a1ede62a8d173083189cf41931bfeddf7b7 Mon Sep 17 00:00:00 2001 From: Santos Sabanari Date: Wed, 8 Jan 2025 21:53:16 +0700 Subject: [PATCH] Update KeepsDeletedModels trait Update KeepsDeletedModels trait for showing error when using php 8.4 --- src/Models/Concerns/KeepsDeletedModels.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/Concerns/KeepsDeletedModels.php b/src/Models/Concerns/KeepsDeletedModels.php index 6b53938..3c8f793 100644 --- a/src/Models/Concerns/KeepsDeletedModels.php +++ b/src/Models/Concerns/KeepsDeletedModels.php @@ -65,7 +65,7 @@ public static function deletedModels(): Builder return static::getDeletedModelClassName()::query()->where('model', $model); } - public static function restore(mixed $key, Closure $beforeSaving = null): Model + public static function restore(mixed $key, ?Closure $beforeSaving = null): Model { $deletedModel = self::findDeletedModelToRestore($key);