MVC pattern quiestion

Hello everyone! I am not sure where I have to define title tag, meta description, keywords, author, breadcrumbs and other tags? In controller by:


    public function actionIndex()



            'name' => 'test',

            'content' => 'Test content',

        ], 'test');


        return $this->render('index', [

            'dataProvider' => $dataProvider,



or in the view by:


$this->title = $model->name;

$this->params['breadcrumbs'][] = $model->name;


    'name' => 'description',

    'content' => $model->meta_description,

], 'description');


Please help me. Want “experienced” answer :)

I put mine in the view. That way they can be used by other controller actions if nessacary.