From cc0225a9bd16195c5cc1786855bc117ebdf43928 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 22 Jul 2019 22:06:11 -0600 Subject: [PATCH] Update PublicApiController --- app/Http/Controllers/PublicApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index 7d4e5c639..bfff71c47 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -529,7 +529,7 @@ class PublicApiController extends Controller $filtered = $ids->filter(function($v) { return $v != Auth::user()->profile->id; }); - $relations = Profile::findOrFail($filtered->all()); + $relations = Profile::whereNull('status')->findOrFail($filtered->all()); $fractal = new Fractal\Resource\Collection($relations, new RelationshipTransformer()); $res = $this->fractal->createData($fractal)->toArray(); return response()->json($res);