src/NilPortugues/Laravel5/JsonApi/Controller/JsonApiController.php
public function show($id)
    {
        $apiRequest = RequestFactory::create();

        $resource = new GetResource(
            $this->serializer,
            $apiRequest->getFields(),
            $apiRequest->getIncludedRelationships()
        );

        $find = $this->findResourceCallable($id);

        return $this->addHeaders($resource->get($id, get_class($this->getDataModel()), $find));
    }
public function show($id)
    {
        $apiRequest = RequestFactory::create();

        $resource = new GetResource(
            $this->serializer,
            $apiRequest->getFields(),
            $apiRequest->getIncludedRelationships()
        );

        $find = $this->findResourceCallable($id);

        return $this->addHeaders($resource->get($id, get_class($this->getDataModel()), $find));
    }
public function show ( $ id ) { $ apiRequest = RequestFactory :: create ( ) ; $ resource = new GetResource ( $ this -> serializer , $ apiRequest -> getFields ( ) , $ apiRequest -> getIncludedRelationships ( ) ) ; $ find = $ this -> findResourceCallable ( $ id ) ; return $ this -> addHeaders ( $ resource -> get ( $ id , get_class ( $ this -> getDataModel ( ) ) , $ find ) ) ; }
Get single resource.

@param $id

@return \Symfony\Component\HttpFoundation\Response
Get single resource .