📅  最后修改于: 2022-03-11 14:54:41.332000             🧑  作者: Mango
use App\User;
use App\Http\Resources\User as UserResource;
Route::get('/user', function () {
return (new UserResource(User::find(1)))
->response()
->setStatusCode(200);
});