2017 © Pedro PelĂĄez
 

library yii2-url-alias

Yii2 url alias

image

robot72/yii2-url-alias

Yii2 url alias

  • Thursday, November 10, 2016
  • by Robot72
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

UrlAlias

Installation

1. Install Repository

You can install via composer., (*1)

Run, (*2)

php composer.phar require --prefer-dist "robot72/yii2-url-alias" "dev-master"

or add to require section of composer.json:, (*3)

"robot72/yii2-url-alias": "dev-master"

2. Edit your config files

2.1. Check Database Connection Params

Check your config/db.php file. Have correct parameters?, (*4)

2.2. Install migrations

php yii migrate/up --migrationPath=@vendor/robot72/yii2-url-alias/migrations, (*5)

If you want example data, run this queries:, (*6)

INSERT INTO `url_rule` (`id`, `slug`, `route`, `params`, `status`) VALUES
(1, '', 'site/index', 'a:0:{}', 1),
(2, 'about', 'site/about', 'a:0:{}', 1);
2.3. Edit config/web.php: file
/** Example urlManager config */
'urlManager' => [
    'enablePrettyUrl' => true,
    'showScriptName'  => false,
    'rules' => [
        [
            'class' => 'robot72\UrlAlias\components\BaseUrlRule',
            'connectionID'  => 'db',
            'redirect301'   => true //if you want 301 redirect
        ]
        ...
    ]
],
2.4 Test

http://YOUR_LOCAL_SERVER/about, (*7)

The Versions

10/11 2016

dev-master

9999999-dev

Yii2 url alias

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 slug

10/11 2016

v0.4.0

0.4.0.0

Yii2 url alias

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 slug

23/10 2016

v0.3.0

0.3.0.0

Yii2 url alias

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 slug

07/08 2015

0.0.2.x-dev

0.0.2.9999999-dev

Yii2 url alias

  Sources   Download

MIT Licence

by Fatih GÜRSOY

05/02 2015

0.0.1.x-dev

0.0.1.9999999-dev

Yii2 url alias

  Sources   Download

MIT Licence

by Fatih GÜRSOY