laravel自定义api路由

创建统一接口文件ApiResponse.php
在这里插入图片描述

<?php

namespace App\Traits;

use Illuminate\Http\Exceptions\HttpResponseException;

trait ApiResponse
{
   
    
    

    /**
     * 成功的时候返回结果
     * @param $data 返回数据集合
     */
    public functi

猜你喜欢

转载自blog.csdn.net/qq_36303853/article/details/130745901