Browse Source

构造方法

master
xyiege 1 year ago
parent
commit
b9e3ba65c2
  1. 16
      app/api/controller/ApiController.php

16
app/api/controller/ApiController.php

@ -16,6 +16,22 @@ abstract class ApiController {
* @var Request
*/
protected $request;
/**
* 构造方法
* BaseController constructor.
* @param App $app
*/
public function __construct(App $app)
{
$this->request = $this->app->request;
// 控制器初始化
$this->initialize();
}
// 初始化
protected function initialize()
{
}
/**
* 返回封装后的 API 数据到客户端
* @param int|null $status

Loading…
Cancel
Save