public function scopeFilterStatuses(Builder $query, ?array $statuses = []): Builder 	{ 		return $statuses ? $query->whereHas('lastStatus', static function (Builder $query) use ($statuses): void { 			$query->whereIn('status_id', $statuses); 		}) 		: $query; 	}