摘要:
1:控制器代码 public function delete($id) { //验证id是否正确 $id if (!intval($id)) { return getJsonData(10010, '参数不正确'); } //删除操作 //检测商品是否存在 $where = [ 'type_id' 阅读全文
posted @ 2021-09-10 20:36
王越666
阅读(61)
评论(0)
推荐(0)
摘要:
1:创建模型 2:定义关联模型 <?php namespace app\common\model; use think\Model; use traits\model\SoftDelete; class TypeModel extends Model { use SoftDelete; //链接py 阅读全文
posted @ 2021-09-10 20:26
王越666
阅读(98)
评论(0)
推荐(0)
摘要:
HTML页面 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /> < 阅读全文
posted @ 2021-09-10 11:30
王越666
阅读(175)
评论(0)
推荐(0)
摘要:
模型代码: //会员 public static function member(){ return self::where('status',1)->select(); } 控制器代码: //会员列表 public function member() { $data = UserModel::me 阅读全文
posted @ 2021-09-10 11:05
王越666
阅读(52)
评论(0)
推荐(0)
摘要:
路由: Route::post('imgs','task/task/uploads'); 控制器代码: // 多文件上传 public function uploads() { //接受参数 $data = []; $files = \request()->file('imgs'); foreach 阅读全文
posted @ 2021-09-10 00:13
王越666
阅读(255)
评论(0)
推荐(1)

浙公网安备 33010602011771号