From a24b4a40e05a4fb6d29bb480279aa710745f8962 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 20 Sep 2019 22:31:34 -0600 Subject: [PATCH] Update BaseApiController --- app/Http/Controllers/Api/BaseApiController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Api/BaseApiController.php b/app/Http/Controllers/Api/BaseApiController.php index e0ea10304..b435d20e3 100644 --- a/app/Http/Controllers/Api/BaseApiController.php +++ b/app/Http/Controllers/Api/BaseApiController.php @@ -48,8 +48,7 @@ class BaseApiController extends Controller public function notifications(Request $request) { abort_if(!$request->user(), 403); - - $pid = Auth::user()->profile->id; + $pid = $request->user()->profile_id; $pg = $request->input('pg'); if($pg == true) { $timeago = Carbon::now()->subMonths(6); @@ -62,7 +61,7 @@ class BaseApiController extends Controller } else { $this->validate($request, [ 'page' => 'nullable|integer|min:1|max:10', - 'limit' => 'nullable|integer|min:1|max:10' + 'limit' => 'nullable|integer|min:1|max:40' ]); $limit = $request->input('limit') ?? 10; $page = $request->input('page') ?? 1;