?

Log in

No account? Create an account

[icon] … — ЖЖ
View:Свежие записи.
View:Архив.
View:Друзья.
View:Личная информация.
You're looking at the latest 5 entries.

Tags:,
Security:
Subject:MemCache
Time:18:51
common/config/main.php

Заменить:

'components' => [
'cache' => [
'class' => 'yii\caching\MemCache',
'useMemcached' => true,
],
],
comments: Оставить комментарий

Tags:,
Security:
Subject:AccessControl для модуля
Time:17:33
backend/controllers/SiteController.php

Убрать:

'access' => [
'class' => AccessControl::className(),
'rules' => [
[
'actions' => ['login', 'error'],
'allow' => true,
],
[
'actions' => ['logout', 'index'],
'allow' => true,
'roles' => ['@'],
],
],
],


backend/config/main.php

Добавить:

'as access' => [
'class' => 'yii\filters\AccessControl',
'except' => ['site/login', 'site/error'],
'rules' => [
[
'allow' => true,
'roles' => ['@'],
],
],
],


'except' - исключение
'only' - только для
comments: Оставить комментарий

Tags:, ,
Security:
Subject:urlManager
Time:17:21
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'' => 'site/index',
'<_a:login|logout>' => 'site/<_a>',
'<_c:[\w\-]+>' => '<_c>/index',
'<_c:[\w\-]+>/<id:\d+>' => '<_c>/view',
'<_c:[\w\-]+>/<_a:[\w\-]+>' => '<_c>/<_a>',
'<_c:[\w\-]+>/<id:\d+>/<_a:[\w\-]+>' => '<_c>/<_a>'
],
],
comments: Оставить комментарий

Tags:, ,
Security:
Subject:Переход на asset-packagist
Time:01:28
composer.json

Добавить

"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],


Удалить

"fxp-asset":{
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}


common/config/main.php

Добавить

'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
comments: Оставить комментарий

Tags:, , ,
Security:
Subject:Настройка папок в PHPStorm
Time:01:02
Settings / Directories
Test Source:

  • backend/tests

  • common/tests

  • frontend/tests


Source:

  • backend

  • common

  • console

  • frontend

Excluded:

  • .vagrant

  • backend/runtime

  • backend/web/assets

  • console/runtime

  • frontend/runtime

  • frontend/web/assets

  • vagrant

  • vendor



Settings / L & F / Composer

Path to composer.json: [path]
[check] Add packages as libraries

Settings / L & F / PHP / Test Frameworks

Codeception Local
Path to Codeception executable: [ \vendor\codeception\base\codecept ]
[check] Default configuration file: [ \codeception.yml ]
comments: Оставить комментарий

[icon] … — ЖЖ
View:Свежие записи.
View:Архив.
View:Друзья.
View:Личная информация.
You're looking at the latest 5 entries.