<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\Course;
use App\Models\Cate;

class CateController extends Controller
{
    //获取分类
    public function getCate(Request $request)
    {
        $pid=$request->input('pid');
        $cates=Cate::where('pid',$pid)
            ->orderBy('sort','desc')->orderBy('id','desc')
            ->get();
        return $this->success($cates);
    }
}
