2017 © Pedro Peláez
 

project yii2-app-advanced

Custom Semantic URLs, admin panel, user, debug, sass

image

art-craft/yii2-app-advanced

Custom Semantic URLs, admin panel, user, debug, sass

  • Monday, July 25, 2016
  • by apuc
  • Repository
  • 3 Watchers
  • 0 Stars
  • 27 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Миграции для user:, (*1)

  1. yii migrate/up --migrationPath=@vendor/dektrium/yii2-user/migrations
  2. yii migrate/up --migrationPath=@yii/rbac/migrations

Для закрытия доступа к админпанели не админам в контролере использовать, (*2)

          'AccessSecure' =>
            [
                'class' => AccessSecure::className(),
                'rules' => [
                    [
                        'actions' => ['login', 'error'],
                        'allow' => true,
                    ],
                    [
                        'allow' => true,
                        'roles' => ['admin'],
                    ],
                ],
            ],

Для формирования транслитерации в названиях в composer.json добавить, (*3)

    "2amigos/yii2-transliterator-helper": "*"

    В моделях

    public function behaviors()
        {
            return [
                'slug' => [
                    'class' => 'common\behaviors\Slug',
                    'in_attribute' => 'title',
                    'out_attribute' => 'slug',
                    'translit' => true
                ],
            ];
        }

The Versions