protected static function fractal(RestRequestContract $request)
    {
        $fractal = new Manager(new ScopeFactory(), $request);
        $fractal->setSerializer(new JsonApiSerializer($request));

        if ($includes = $request->getInclude()) {
            $fractal->parseIncludes($includes);
        }

        if ($excludes = $request->getExclude()) {
            $fractal->parseExcludes($excludes);
        }

        if ($fields = $request->getFields()) {
            $fractal->parseFieldsets($fields);
        }

        return $fractal;
    }
protected static function fractal(RestRequestContract $request)
    {
        $fractal = new Manager(new ScopeFactory(), $request);
        $fractal->setSerializer(new JsonApiSerializer($request));

        if ($includes = $request->getInclude()) {
            $fractal->parseIncludes($includes);
        }

        if ($excludes = $request->getExclude()) {
            $fractal->parseExcludes($excludes);
        }

        if ($fields = $request->getFields()) {
            $fractal->parseFieldsets($fields);
        }

        return $fractal;
    }
protected static function fractal ( RestRequestContract $ request ) { $ fractal = new Manager ( new ScopeFactory ( ) , $ request ) ; $ fractal -> setSerializer ( new JsonApiSerializer ( $ request ) ) ; if ( $ includes = $ request -> getInclude ( ) ) { $ fractal -> parseIncludes ( $ includes ) ; } if ( $ excludes = $ request -> getExclude ( ) ) { $ fractal -> parseExcludes ( $ excludes ) ; } if ( $ fields = $ request -> getFields ( ) ) { $ fractal -> parseFieldsets ( $ fields ) ; } return $ fractal ; }
Return configured fractal by request format.

@param RestRequestContract $request

@return Manager
Return configured fractal by request format .