art

Heroes with this tag

<?php
use ...

class TagController extends Controller
{
    // ...
        public function actionView($id)
    {
        $tag = $this->findModel($id);
        $heroes = new ActiveDataProvider([
            'query' => $tag->getModels()->orderBy('last_name'),
        ]);

        return $this->render('view', [
            'tag' => $tag,
            'heroes' => $heroes
        ]);
    }
    // ...
}