Skip to content

Instantly share code, notes, and snippets.

@raminious
Created September 29, 2014 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raminious/f8565c079e48d496b3e1 to your computer and use it in GitHub Desktop.
Save raminious/f8565c079e48d496b3e1 to your computer and use it in GitHub Desktop.
Yii frontend config
<?php
$params = array_merge(
require(__DIR__ . '/../../common/config/params.php'),
require(__DIR__ . '/../../common/config/params-local.php'),
require(__DIR__ . '/params.php'),
require(__DIR__ . '/params-local.php')
);
return [
'id' => 'app-frontend',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'frontend\controllers',
//'homeUrl' => '/',
'components' => [
'request' => [
'baseUrl' => '/',
],
'user' => [
'identityClass' => 'common\models\User',
'enableAutoLogin' => true,
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'errorHandler' => [
'errorAction' => 'site/error',
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
]
]
],
'params' => $params,
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment