Update ApiController

pull/1752/head
Daniel Supernault 5 years ago
parent 9fc9058aa0
commit 9a50a6f627
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -1164,14 +1164,14 @@ class ApiV1Controller extends Controller
$id = $min ?? $max;
$notifications = Notification::whereProfileId($pid)
->whereDate('created_at', '>', $timeago)
->latest()
->where('id', $dir, $id)
->orderByDesc('created_at')
->limit($limit)
->get();
} else {
$notifications = Notification::whereProfileId($pid)
->whereDate('created_at', '>', $timeago)
->latest()
->orderByDesc('created_at')
->simplePaginate($limit);
}
$resource = new Fractal\Resource\Collection($notifications, new NotificationTransformer());

Loading…
Cancel
Save