<?php

namespace app\api\controller\v1;

use app\api\controller\Api;

class Dkcase
{


    public $restMethodList = 'get';

    public function index()
    {
        //全部案例推荐
        $groupModel=model('Dkcase');
        $list=$groupModel->all_case_sort();
        $result=new Api();
        if($list){
            return $result->sendSuccess($list,'SUCCESS','200');
        }else{
            return $result->sendSuccess($list,'SUCCESS','200');
        }

    }

    public function read($id){
        //某一分类的案例推荐
//        var_dump($id);die;
        $groupModel=model('Dkcase');
        $list=$groupModel->all_case_sort($id);
        $result=new Api();
        if($list){
            return $result->sendSuccess($list,'SUCCESS','200');
        }else{
            return $result->sendSuccess($list,'SUCCESS','200');
        }


    }
}