You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
683 B
43 lines
683 B
<?php
|
|
|
|
namespace api\controllers;
|
|
|
|
use backend\models\ars\Address;
|
|
use Yii;
|
|
use yii\web\NotFoundHttpException;
|
|
|
|
/**
|
|
* @author iron
|
|
* @email weiriron@gmail.com
|
|
*/
|
|
class AddressController extends CommonController
|
|
{
|
|
public $modelClass = 'backend\models\ars\Address';
|
|
|
|
|
|
|
|
|
|
public function actions()
|
|
{
|
|
$action = parent::actions();
|
|
return $action;
|
|
}
|
|
|
|
public function actionIndex()
|
|
{
|
|
return Address::find()
|
|
->where(['user_id' => Yii::$app->user->getId()])
|
|
->all();
|
|
}
|
|
|
|
public function actionUpdate()
|
|
{
|
|
|
|
}
|
|
|
|
public function actionCreate()
|
|
{
|
|
return Yii::$app->address->create();
|
|
}
|
|
|
|
}
|