Tax.php
43 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\Tax; |
| 9 | |
| 10 | use AmeliaBooking\Application\Controller\Tax\AddTaxController; |
| 11 | use AmeliaBooking\Application\Controller\Tax\DeleteTaxController; |
| 12 | use AmeliaBooking\Application\Controller\Tax\GetTaxController; |
| 13 | use AmeliaBooking\Application\Controller\Tax\GetTaxesController; |
| 14 | use AmeliaBooking\Application\Controller\Tax\UpdateTaxController; |
| 15 | use AmeliaBooking\Application\Controller\Tax\UpdateTaxStatusController; |
| 16 | use Slim\App; |
| 17 | |
| 18 | /** |
| 19 | * Class Tax |
| 20 | * |
| 21 | * @package AmeliaBooking\Infrastructure\Routes\Tax |
| 22 | */ |
| 23 | class Tax |
| 24 | { |
| 25 | /** |
| 26 | * @param App $app |
| 27 | */ |
| 28 | public static function routes(App $app) |
| 29 | { |
| 30 | $app->get('/taxes', GetTaxesController::class); |
| 31 | |
| 32 | $app->get('/taxes/{id:[0-9]+}', GetTaxController::class); |
| 33 | |
| 34 | $app->post('/taxes', AddTaxController::class); |
| 35 | |
| 36 | $app->post('/taxes/delete/{id:[0-9]+}', DeleteTaxController::class); |
| 37 | |
| 38 | $app->post('/taxes/{id:[0-9]+}', UpdateTaxController::class); |
| 39 | |
| 40 | $app->post('/taxes/status/{id:[0-9]+}', UpdateTaxStatusController::class); |
| 41 | } |
| 42 | } |
| 43 |