public function index()
{
//ここに通常の処理を書く

$this->Session->write('hoge', 'key_hoge');
return $this->redirect('/hoges/fuga');
}

public function fuga()
{
$sessionData = $this->Session->read('hoge');
if(empty($sessionData)){
throw new NotFoundException();
}
$this->Session->destroy();
}


▲上に戻る