Flight::ok($object); } catch (Exception $exception) { Flight::error($exception); } }); Flight::route('GET /v1/main/userinfo/@id', function ($id) { try { $object = UserInfo::select($id); Flight::ok($object); } catch (Exception $exception) { Flight::error($exception); } }); Flight::route('POST /v1/main/userinfo', function () { try { $object = UserInfo::insert(); Flight::ok($object); } catch (Exception $exception) { Flight::error($exception); } }); Flight::route('PUT /v1/main/userinfo/@id', function ($id) { try { $object = UserInfo::update($id); Flight::ok($object); } catch (Exception $exception) { Flight::error($exception); } }); Flight::route('DELETE /v1/main/userinfo/@id', function ($id) { try {