Problem with URL Manager Rule

I need to create websiteurl/tasks/view/2 url. I created rule [‘tasks/view/’ => ‘tasks/view’] in the Url Manager component. I want that this rule run actionView in the TasksController. After rule creation I have got

Unknown Property – yii\base\UnknownPropertyException

Setting unknown property: yii\web\UrlRule::tasks/view/

mistake. What is wrong and how to solve?

I’m guessing that you put your rule in the wrong place. See the Guide for details.