art-craft / yii2-app-advanced
Custom Semantic URLs, admin panel, user, debug, sass
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 0
Language:JavaScript
Type:project
Requires
- php: >=5.4.0
- dektrium/yii2-rbac: dev-master
- dektrium/yii2-user: 0.9.*@dev
- yiisoft/yii2: >=2.0.6
- yiisoft/yii2-bootstrap: *
- yiisoft/yii2-swiftmailer: *
Requires (Dev)
This package is auto-updated.
Last update: 2025-01-16 22:24:31 UTC
README
Миграции для user:
- yii migrate/up --migrationPath=@vendor/dektrium/yii2-user/migrations
- yii migrate/up --migrationPath=@yii/rbac/migrations
Для закрытия доступа к админпанели не админам в контролере использовать
'AccessSecure' =>
[
'class' => AccessSecure::className(),
'rules' => [
[
'actions' => ['login', 'error'],
'allow' => true,
],
[
'allow' => true,
'roles' => ['admin'],
],
],
],
Для формирования транслитерации в названиях в composer.json добавить
"2amigos/yii2-transliterator-helper": "*"
В моделях
public function behaviors()
{
return [
'slug' => [
'class' => 'common\behaviors\Slug',
'in_attribute' => 'title',
'out_attribute' => 'slug',
'translit' => true
],
];
}