find($pid); if (! $gp) { return null; } $fractal = new Fractal\Manager; $fractal->setSerializer(new ArraySerializer); $resource = new Fractal\Resource\Item($gp, new GroupPostTransformer); $res = $fractal->createData($resource)->toArray(); $res['pf_type'] = 'group:post:comment'; $res['url'] = $gp->url(); // if($gp['type'] == 'poll') { // $status['poll'] = PollService::get($status['id']); // } // $status['account']['url'] = url("/groups/{$gp['group_id']}/user/{$status['account']['id']}"); return $res; }); } public static function del($gid, $pid) { return Cache::forget(self::key($gid, $pid)); } }