1
0
Fork 0

Update BaseApiController

This commit is contained in:
Daniel Supernault 2019-04-29 20:08:02 -06:00
parent 85bdea4375
commit 080516a7eb
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 2 additions and 2 deletions

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();