feat: increase gallery grid from 4 to 5 columns per row on desktopfeat: increase gallery grid from 4 to 5 columns per row on desktop
This commit is contained in:
@@ -14,26 +14,21 @@ class MonthlyCommentatorsController extends Controller
|
||||
$page = max(1, (int) $request->query('page', 1));
|
||||
|
||||
$query = DB::table('artwork_comments as t1')
|
||||
->leftJoin('users as t2', 't1.user_id', '=', 't2.user_id')
|
||||
->leftJoin('country as c', 't2.country', '=', 'c.id')
|
||||
->leftJoin('users as t2', 't1.user_id', '=', 't2.id')
|
||||
->where('t1.user_id', '>', 0)
|
||||
->whereRaw("DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= t1.date")
|
||||
->whereRaw('t1.created_at >= DATE_SUB(NOW(), INTERVAL 30 DAY)')
|
||||
->select(
|
||||
't2.user_id',
|
||||
't2.uname',
|
||||
't2.user_type',
|
||||
't2.country',
|
||||
'c.name as country_name',
|
||||
'c.flag as country_flag',
|
||||
't2.id as user_id',
|
||||
DB::raw('COALESCE(t2.username, t2.name, "User") as uname'),
|
||||
DB::raw('COUNT(*) as num_comments')
|
||||
)
|
||||
->groupBy('t1.user_id')
|
||||
->groupBy('t2.id')
|
||||
->orderByDesc('num_comments');
|
||||
|
||||
$rows = $query->paginate($hits)->withQueryString();
|
||||
|
||||
$page_title = 'Monthly Top Commentators';
|
||||
|
||||
return view('user.monthly-commentators', compact('page_title', 'rows'));
|
||||
return view('web.comments.monthly', compact('page_title', 'rows'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user