src/Controller/AbstractTagsController.php
public function view($id = null)
    {
        $tag = $this->Tags->get($id, [
            'contain' => []
        ]);

        $this->set('tag', $tag);
        $this->set('_serialize', ['tag']);
    }
public function view($id = null)
    {
        $tag = $this->Tags->get($id, [
            'contain' => []
        ]);

        $this->set('tag', $tag);
        $this->set('_serialize', ['tag']);
    }
View method

@param string|null $id Tag id.
@return \Cake\Network\Response|null
@throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.