Created
August 20, 2018 21:59
-
-
Save davidchc/0da92c2845d73e8adcd2e72b7b6921c1 to your computer and use it in GitHub Desktop.
exemplo de api com SLIM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once __DIR__.'/vendor/composer.php'; | |
$app = new \Slim\App(); | |
//Define a versão da API | |
$app->group('/v1', function(){ | |
//recebe o POST | |
// seusite.com.br/v1/shippings | |
$this->post('/shippings', function ($request, $response, $args) { | |
/**retorna as formas de frete*/ | |
}); | |
}); | |
$app->run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment