Thinkphp5 defines the route as a post , and how to customize the error when using get request
if a post route is defined in application/route.php in thinkphp5, as follows, how to customize the wrong content and return the wrong json when we request in the wrong way.
Route::group("user", function (){
Route::post("/login", "api/User/login");
});
normal access, use post request. The result returned above is:
{
"code": 10001,
"msg": "",
"request_url": "/index.php/user/login"
}
ask which Daniel to have a look!
