Add all of the potential transformers that might be needed for now.

This commit is contained in:
Dane Everitt 2017-04-07 20:28:58 -04:00
parent 65630bdcce
commit 51204b8d9d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
12 changed files with 642 additions and 9 deletions

View file

@ -64,10 +64,7 @@ class ServerController extends Controller
$fractal = Fractal::create()->item($server);
if ($request->input('include')) {
$fractal->parseIncludes(collect(explode(',', $request->input('include')))->intersect([
'allocations', 'subusers', 'user',
'pack', 'service', 'option',
])->toArray());
$fractal->parseIncludes(explode(',', $request->input('include')));
}
return $fractal->transformWith(new ServerTransformer)

View file

@ -47,9 +47,7 @@ class ServerController extends Controller
$fractal = Fractal::create()->item($server);
if ($request->input('include')) {
$fractal->parseIncludes(collect(explode(',', $request->input('include')))->intersect([
'allocations', 'subusers', 'stats',
])->toArray());
$fractal->parseIncludes(explode(',', $request->input('include')));
}
return $fractal->transformWith(new ServerTransformer)