From 11d547415e7f42eaef57f4ca57e0e6d58e20d8a4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 14 Sep 2026 18:44:11 +0930 Subject: [PATCH] Add HasMany return type to CustomFilter::statuses() for Larastan Larastan v3.12.0 added the larastan.relationExistence rule, which detects Eloquent relations by their declared return type. statuses() defined the hasMany relation but lacked the ': HasMany' return type, so the rule could not recognize it and flagged $filter->load([..., 'statuses']) in CustomFilterController.php as referencing a missing relation. Add the return type to match the sibling keywords() method. Verified with larastan/larastan v3.12.0 (No errors). --- app/Models/CustomFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/CustomFilter.php b/app/Models/CustomFilter.php index 79dd3056e..9cc79d028 100644 --- a/app/Models/CustomFilter.php +++ b/app/Models/CustomFilter.php @@ -72,7 +72,7 @@ class CustomFilter extends Model return $this->hasMany(CustomFilterKeyword::class); } - public function statuses() + public function statuses(): HasMany { return $this->hasMany(CustomFilterStatus::class); }