Skip to content

deesoft/yii2-client-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 Client Side Url Manager

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])

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published