public function show($id)
    {
        $file = $this->repository->getById($id);

        if (!$file) {
            return $this->errorNotFound();
        }

        $this->authorize('read', $file);
        return new FileResource($file);
    }
public function show($id)
    {
        $file = $this->repository->getById($id);

        if (!$file) {
            return $this->errorNotFound();
        }

        $this->authorize('read', $file);
        return new FileResource($file);
    }
public function show ( $ id ) { $ file = $ this -> repository -> getById ( $ id ) ; if ( ! $ file ) { return $ this -> errorNotFound ( ) ; } $ this -> authorize ( 'read' , $ file ) ; return new FileResource ( $ file ) ; }
Display a specified file.

@SWG\Get(
path="/files/{id}",
tags={"files"},
summary="Returns a specific file by id",
description="Returns a specific file by id",
produces={"application/json"},
security={{"AdminAccess": {}}},
@SWG\Parameter(
name="id",
in="path",
description="Id of file that needs to be returned.",
required=true,
type="integer"
),
@SWG\Response(
response=200,
description="Successful operation",
@SWG\Schema(type="object", ref="#/definitions/File"),
),
@SWG\Response(response=404, description="File not found")
)

@param int $id content Id

@return FileResource
Display a specified file .