예제 #1
0
파일: main.php 프로젝트: rhalf/app_track
    }
});
//=============================================================================
//AppInfo
//=============================================================================
Flight::route('GET /v1/main/appinfo', function () {
    try {
        $array = AppInfo::selectAll();
        Flight::ok($array);
    } catch (Exception $exception) {
        Flight::error($exception);
    }
});
Flight::route('GET /v1/main/appinfo/@id', function ($id) {
    try {
        $object = AppInfo::select($id);
        Flight::ok($object);
    } catch (Exception $exception) {
        Flight::error($exception);
    }
});
Flight::route('POST /v1/main/appinfo', function () {
    try {
        $object = AppInfo::insert();
        Flight::ok($object);
    } catch (Exception $exception) {
        Flight::error($exception);
    }
});
Flight::route('PUT /v1/main/appinfo/@id', function ($id) {
    try {