Fix more Users stuff

This commit is contained in:
DariusIII
2017-12-26 00:14:39 +01:00
parent 8d2c3d856d
commit 58fb2f8586
7 changed files with 39 additions and 26 deletions
+2 -2
View File
@@ -385,7 +385,7 @@ class User extends Authenticatable
* @return \Illuminate\Database\Eloquent\Collection|static[]
* @throws \Exception
*/
public function getRange($start, $offset, $orderBy, $userName = '', $email = '', $host = '', $role = '')
public static function getRange($start, $offset, $orderBy, $userName = '', $email = '', $host = '', $role = '')
{
UserRequest::clearApiRequests(false);
@@ -872,7 +872,7 @@ class User extends Authenticatable
/**
* @return \Illuminate\Database\Eloquent\Collection|\Illuminate\Support\Collection|static[]
*/
public function getUsersByMonth()
public static function getUsersByMonth()
{
return self::query()->whereNotNull('created_at')->where('created_at', '!=', '0000-00-00 00:00:00')->selectRaw("DATE_FORMAT(created_at, '%M %Y') as mth, COUNT(id) as num")->groupBy(['mth'])->orderBy('created_at', 'desc')->get();
}