Example #1
0
 public function postRead()
 {
     $recipe = new Recipes();
     $data = $recipe->getRecipes();
     return Response::json($data);
 }
Example #2
0
        $upload = new Upload();
        //коммент
        call_user_func(array($upload, 'out'));
        break;
    case 'auth':
        header('Content-Type: application/json');
        $ident = new auth();
        if (isset($_GET['auth'])) {
            $auth = $_GET['auth'];
            switch ($auth) {
                case 'user':
                    $ident->get_user();
                    break;
                case 'logout':
                    $ident->logount();
                    break;
                default:
                    $ident->login();
                    break;
            }
        } else {
            $ident->login();
        }
        break;
    default:
        // header('Content-Type: application/json');
        $recipes = new Recipes();
        $shag = $_GET['shag'];
        echo $recipes->getRecipes($shag);
        break;
}