Basic基类
目录结构
├─basic
│ BaseController.php
│ BaseManager.php
│ BaseMessage.php
│ BaseStorage.php
│ BaseUpload.php
BaseController
用来继承在控制器中,内部自带数据验证函数和返回json的方法方便调用
创建User控制器,文件存放目录:app\controller\admin\user\User.php
<?php
namspase app\api\controller\user;
class User extends BaseController
{
public function index()
{
return app('json')->success('ok');
}
}