How can I call controller function with foreach loop?

I have the following within my foreach loop within my index file:

foreach($dataProvider->getModels() as $post) { 

    $status = $this->status($post->id);



However get the following error, I can confirm the function I am trying to call works because in the single view file:

    Calling unknown method: yii\web\View::status()

You call unknown method of View object.

Var $this pointed to View object in view file.

You may access the controller by "$this->context".