yinxu46/frappe-php

v1.1.3 2024-08-17 02:26 UTC

This package is not auto-updated.

Last update: 2024-11-09 03:29:03 UTC


README

thinkphp6|thinkphp8 Json To Api

安装

composer require yinxu46/frappe-php

使用

路由中使用

Route::rule('/api.web.v1/:__id$',function (Request $request, string $__id) {
    try {
        $response = frappe_api($__id);
        return api_success($response);
    }catch (\Throwable $throwable) {
        return api_error($throwable);
    }
})->middleware([
    # 设置中间键
]);