getting api working
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
<?php
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ $params = array_merge(
|
|||||||
);
|
);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'id' => 'app-backend',
|
'id' => 'calorie-api',
|
||||||
'basePath' => dirname(__DIR__),
|
'basePath' => dirname(__DIR__),
|
||||||
'controllerNamespace' => 'backend\controllers',
|
'controllerNamespace' => 'api\controllers',
|
||||||
'bootstrap' => ['log'],
|
'bootstrap' => ['log'],
|
||||||
'modules' => [],
|
'modules' => [],
|
||||||
'components' => [
|
'components' => [
|
||||||
@@ -23,7 +23,7 @@ return [
|
|||||||
],
|
],
|
||||||
'session' => [
|
'session' => [
|
||||||
// this is the name of the session cookie used for login on the backend
|
// this is the name of the session cookie used for login on the backend
|
||||||
'name' => 'advanced-backend',
|
'name' => 'calorie-api',
|
||||||
],
|
],
|
||||||
'log' => [
|
'log' => [
|
||||||
'traceLevel' => YII_DEBUG ? 3 : 0,
|
'traceLevel' => YII_DEBUG ? 3 : 0,
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
];
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace backend\controllers;
|
namespace api\controllers;
|
||||||
|
|
||||||
use common\models\LoginForm;
|
use common\models\LoginForm;
|
||||||
use Yii;
|
use Yii;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ return [
|
|||||||
'Development' => [
|
'Development' => [
|
||||||
'path' => 'dev',
|
'path' => 'dev',
|
||||||
'setWritable' => [
|
'setWritable' => [
|
||||||
|
'api/runtime',
|
||||||
'console/runtime',
|
'console/runtime',
|
||||||
'frontend/runtime',
|
'frontend/runtime',
|
||||||
'frontend/web/assets',
|
'frontend/web/assets',
|
||||||
@@ -41,6 +42,7 @@ return [
|
|||||||
'yii_test',
|
'yii_test',
|
||||||
],
|
],
|
||||||
'setCookieValidationKey' => [
|
'setCookieValidationKey' => [
|
||||||
|
'api/config/main-local.php',
|
||||||
'common/config/codeception-local.php',
|
'common/config/codeception-local.php',
|
||||||
'frontend/config/main-local.php',
|
'frontend/config/main-local.php',
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user