Answer the question
In order to leave comments, you need to log in
Why is the page or data not displayed on post request with rest api?
I have config in api/config/main.php
'urlManager' => [
'enablePrettyUrl' => true,
'enableStrictParsing' => true,
'showScriptName' => false,
'rules' => [
[
'class' => 'yii\rest\UrlRule',
'controller' => ['v1/auth'],
'pluralize' => false,
'extraPatterns' => [
'POST auth' => 'auth/index',
]
],
],
],
namespace api\modules\v1\controllers;
class AuthController extends ApiController
{
/**
* @brief Авторизация
*/
public function actionIndex()
{
var_dump("hello"); die();
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question