Update PublicApiController

This commit is contained in:
Daniel Supernault 2019-07-22 22:06:11 -06:00
parent 6fce4e2286
commit cc0225a9bd
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -529,7 +529,7 @@ class PublicApiController extends Controller
$filtered = $ids->filter(function($v) { $filtered = $ids->filter(function($v) {
return $v != Auth::user()->profile->id; 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()); $fractal = new Fractal\Resource\Collection($relations, new RelationshipTransformer());
$res = $this->fractal->createData($fractal)->toArray(); $res = $this->fractal->createData($fractal)->toArray();
return response()->json($res); return response()->json($res);