44 lines
845 B
PHP
44 lines
845 B
PHP
<?php
|
|
|
|
namespace app\controllers;
|
|
|
|
use Yii;
|
|
use yii\web\Controller;
|
|
use yii\filters\VerbFilter;
|
|
use yii\helpers\FileHelper;
|
|
use app\models\User;
|
|
use app\models\Gate;
|
|
use app\models\Camera;
|
|
use app\models\Card;
|
|
use app\models\CardGroup;
|
|
use app\models\Logs;
|
|
use app\models\Config;
|
|
|
|
/**
|
|
* CardController implements the CRUD actions for Card model.
|
|
*/
|
|
class ApiController extends Controller {
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function behaviors() {
|
|
return [
|
|
'verbs' => [
|
|
'class' => VerbFilter::className(),
|
|
'actions' => [
|
|
'delete' => ['POST'],
|
|
],
|
|
],
|
|
];
|
|
}
|
|
|
|
public function actionLogin() {
|
|
if (Yii::$app->request->post()) {
|
|
$post = Yii::$app->request->bodyParams;
|
|
|
|
}
|
|
}
|
|
|
|
}
|