src/Gzero/Cms/Http/Controllers/Api/BlockController.php
public function show($id)
    {
        $block = $this->repository->getById($id);

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

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

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

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

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

@param int $id content Id

@return BlockResource
Display a specified block .