Commit 7c40a749 by Qiang Xue

Merge pull request #6239 from surgat/patch-1

Update runtime-routing.md
parents 87c002d5 08e65958
......@@ -578,19 +578,11 @@ We can create the following URL rule class to solve this problem.
```php
namespace app\components;
use yii\web\UrlRule;
use yii\web\UrlRuleInterface;
use yii\base\Object;
class CarUrlRule extends UrlRule
class CarUrlRule extends Object implements UrlRuleInterface
{
public $db = 'db';
public function init()
{
parent::init();
if ($this->name === null) {
$this->name = __CLASS__;
}
}
public function createUrl($manager, $route, $params)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment