2017 © Pedro Peláez
 

yii2-extension yii2-urlalias

like opencart seo url

image

caijq4ever/yii2-urlalias

like opencart seo url

  • Tuesday, July 25, 2017
  • by caijq4ever
  • Repository
  • 1 Watchers
  • 2 Stars
  • 37 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 12 % Grown

The README.md

yii2 url alias

like opencart seo url, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

composer require --prefer-dist caijq4ever/yii2-urlalias "dev-master"

or add, (*4)

"caijq4ever/yii2-urlalias": "dev-master"

to the require section of your composer.json file., (*5)

Usage

1.Edit config/web.php file, (*6)

'components' => [
    ...
    'urlManager' => [
        'enablePrettyUrl' => true,
        'showScriptName' => false,
        'rules' => [
            [
                'class' => 'junqi\urlalias\UrlRule',
            ],
        ],
    ],
    ...
],

2.Install migrations yii migrate/up --migrationPath=@vendor/caijq4ever/yii2-urlalias/migrations, (*7)

3.Insert fake data, (*8)

INSERT INTO `url_alias` (`id`, `alias`, `route`, `params`, `status`) VALUES
(1, 'hello', 'site/index', 'a:0:{}', 1),
(2, 'world', 'site/about', 'a:0:{}', 1);

4.Run http://path/to/your/project/hello on your browser, (*9)

TODO

  • Cache
  • ...

The Versions

25/07 2017

dev-master

9999999-dev

like opencart seo url

  Sources   Download

MIT

The Requires

 

by Junqi Cai

extension yii2 seo url alias