Created
January 28, 2016 13:03
-
-
Save hndr91/de7667e01f397ee80978 to your computer and use it in GitHub Desktop.
Routing Slim
This file contains hidden or 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 'vendor/autoload.php' //fitur autoload composer | |
| //Inisiasi Slim Framewrok | |
| $app = new \Slim\Slim(); | |
| //home routing | |
| $app->get('/', function(){ | |
| echo "Home Base"; //print "Home Base" at http://localhost/slim | |
| }); | |
| //more routing | |
| $app->get('/test', function(){ | |
| echo "Test route"; //print "Test route" at http://localhost/slim/test | |
| }); | |
| //run Slim Framework | |
| $app->run(); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment