1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 17:26:43 +00:00

Merge pull request #1224 from pixelfed/frontend-ui-refactor

Update BaseApiController
This commit is contained in:
daniel 2019-04-29 20:09:06 -06:00 committed by GitHub
commit afadcb9007
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,8 +59,8 @@ class BaseApiController extends Controller
$timeago = Carbon::now()->subMonths(6);
$notifications = Notification::whereProfileId($pid)
->whereDate('created_at', '>', $timeago)
->orderBy('created_at','desc')
->paginate(10);
->latest()
->simplePaginate(10);
$resource = new Fractal\Resource\Collection($notifications, new NotificationTransformer());
$res = $this->fractal->createData($resource)->toArray();