Category.php
46 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @copyright © Melograno Ventures. All rights reserved. |
| 5 | * @licence See COPYING.md for license details. |
| 6 | */ |
| 7 | |
| 8 | namespace AmeliaBooking\Infrastructure\Routes\Bookable; |
| 9 | |
| 10 | use AmeliaBooking\Application\Controller\Bookable\Category\AddCategoryController; |
| 11 | use AmeliaBooking\Application\Controller\Bookable\Category\DeleteCategoryController; |
| 12 | use AmeliaBooking\Application\Controller\Bookable\Category\GetCategoriesController; |
| 13 | use AmeliaBooking\Application\Controller\Bookable\Category\GetCategoryController; |
| 14 | use AmeliaBooking\Application\Controller\Bookable\Category\GetCategoryDeleteEffectController; |
| 15 | use AmeliaBooking\Application\Controller\Bookable\Category\UpdateCategoriesPositionsController; |
| 16 | use AmeliaBooking\Application\Controller\Bookable\Category\UpdateCategoryController; |
| 17 | use Slim\App; |
| 18 | |
| 19 | /** |
| 20 | * Class Category |
| 21 | * |
| 22 | * @package AmeliaBooking\Infrastructure\Routes\Bookable |
| 23 | */ |
| 24 | class Category |
| 25 | { |
| 26 | /** |
| 27 | * @param App $app |
| 28 | */ |
| 29 | public static function routes(App $app) |
| 30 | { |
| 31 | $app->get('/categories', GetCategoriesController::class); |
| 32 | |
| 33 | $app->get('/categories/{id:[0-9]+}', GetCategoryController::class); |
| 34 | |
| 35 | $app->post('/categories', AddCategoryController::class); |
| 36 | |
| 37 | $app->post('/categories/delete/{id:[0-9]+}', DeleteCategoryController::class); |
| 38 | |
| 39 | $app->post('/categories/{id:[0-9]+}', UpdateCategoryController::class); |
| 40 | |
| 41 | $app->post('/categories/positions', UpdateCategoriesPositionsController::class); |
| 42 | |
| 43 | $app->get('/categories/effect/{id:[0-9]+}', GetCategoryDeleteEffectController::class); |
| 44 | } |
| 45 | } |
| 46 |