public function __construct(Manager $fractal) { $this->fractal = $fractal; } protected function respondWithItem($item, $callback) { //Create item then return it with respondWithArray() } protected function respondWithCollection($collection, $callback){ //Create Collection then return it with respondWithArray() } protected function respondWithArray(array $array, array $headers = []) { $response = response()->json($array, $this->statusCode, $headers); return $response; }