suyuan-breed/app/api/controller/FarmController.php

17 lines
370 B
PHP

<?php
namespace app\api\controller;
use app\common\model\farm\Farm;
class FarmController extends BaseApiController
{
public function list()
{
$where = [
['user_id','=',$this->userId]
];
$data = Farm::where($where)->order('create_time desc')->select()->toArray();
return $this->success('请求成功',$data);
}
}