From c60bf4095ea0d059a8465041817eeef0036bb846 Mon Sep 17 00:00:00 2001 From: a-komarev Date: Sun, 18 Feb 2018 02:54:32 +0300 Subject: [PATCH] Thread method getBySubject call where from static this behavior important if Thread model will be extended --- src/Models/Thread.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/Thread.php b/src/Models/Thread.php index a8b46ae..fd0c7bf 100644 --- a/src/Models/Thread.php +++ b/src/Models/Thread.php @@ -125,11 +125,11 @@ public static function getAllLatest() * Returns all threads by subject. * * @param string $subject - * @return self + * @return \Illuminate\Database\Eloquent\Collection|static[] */ public static function getBySubject($subject) { - return self::where('subject', 'like', $subject)->get(); + return static::where('subject', 'like', $subject)->get(); } /**