Advertisement
tlmarker1968

Untitled

Jan 18th, 2020
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.79 KB | None | 0 0
  1. <?php
  2.     /**
  3.      * Phoenix Hospitality Management System
  4.      * Phoenix REST API - API routes file
  5.      * Written in PHP using the Slim microframework
  6.      *
  7.      * @author Troy L. Marker
  8.      * @version 0.5.0
  9.      * @since 0.5.0
  10.      * @copyright Copyright (c) 2010 By Troy Marker Enterprises
  11.      *
  12.      * Declare namespace and Import needed functions/classes
  13.      */
  14.     use Slim\App;
  15.     use \App\Action\Grade\AddAction as GradeAdd;
  16.     return function (App $app) {
  17.         $app->get('/', \App\Action\InfoAction::class); // Route to the API information page
  18.         $app->post('/grade/add[/]', GradeAdd); // Route to the Grade Addition API call
  19.         $app->get('/grade/list[/]', \App\Action\Grade\ListAction::class); // Route to the Grade List API call
  20.         $app->delete('/grade/remove/[{id}]', \App\Action\Grade\RemoveAction::class); // Route to the Grade Removal API call
  21.         $app->get('/grade/single/[{id}]', \App\Action\Grade\SingleAction::class); // Route to the Grade Single call
  22.         $app->post('/grade/update/{id}/{grade}', \App\Action\Grade\UpdateAction::class); // Route Grade Update API call
  23.         $app->post('/department/add[/]', \App\Action\Department\AddAction::class); // Route to the Department Addition API call
  24.         $app->get('/department/list[/]', \App\Action\Department\ListAction::class); // Route to the Department List API call
  25.         $app->delete('/department/remove/[{id}]', \App\Action\Department\RemoveAction::class); // Route to the Department Removal API call
  26.         $app->get('/department/single/[{id}]', \App\Action\Department\SingleAction::class); // Route to the Department Single API call
  27.         $app->post('/department/update/{id}/{department}', \App\Action\Department\UpdateAction::class); // Route to the Dapartment Update API call
  28.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement