mirror of https://github.com/pixelfed/pixelfed.git
Merge pull request #1224 from pixelfed/frontend-ui-refactor
Update BaseApiController
This commit is contained in:
commit
afadcb9007
|
@ -59,8 +59,8 @@ class BaseApiController extends Controller
|
||||||
$timeago = Carbon::now()->subMonths(6);
|
$timeago = Carbon::now()->subMonths(6);
|
||||||
$notifications = Notification::whereProfileId($pid)
|
$notifications = Notification::whereProfileId($pid)
|
||||||
->whereDate('created_at', '>', $timeago)
|
->whereDate('created_at', '>', $timeago)
|
||||||
->orderBy('created_at','desc')
|
->latest()
|
||||||
->paginate(10);
|
->simplePaginate(10);
|
||||||
$resource = new Fractal\Resource\Collection($notifications, new NotificationTransformer());
|
$resource = new Fractal\Resource\Collection($notifications, new NotificationTransformer());
|
||||||
$res = $this->fractal->createData($resource)->toArray();
|
$res = $this->fractal->createData($resource)->toArray();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue