deesoft/yii2-client-url

Yii2 js url generator

Installs: 0

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

pkg:composer/deesoft/yii2-client-url

dev-master / 1.0.x-dev 2025-10-18 02:24 UTC

This package is auto-updated.

Last update: 2025-10-18 02:33:54 UTC


README

This is the Yii 2 client-side url manager.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist deesoft/yii2-client-url "*"

or add

"deesoft/yii2-client-url": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it at main layout :

dee\clientUrl\Helper::registerJs($this);

Create Url

Use function yiiUrl to generate url from route. It's equivalent with yii\helpers\Url::to().

const {yiiUrl} = window;

const url = yiiUrl('product/view', {id: row.id}); // equivalent Url::to(['/product/view', id' => $row->id])