Skip to content

Instantly share code, notes, and snippets.

@hndr91
Created January 28, 2016 13:03
Show Gist options
  • Select an option

  • Save hndr91/de7667e01f397ee80978 to your computer and use it in GitHub Desktop.

Select an option

Save hndr91/de7667e01f397ee80978 to your computer and use it in GitHub Desktop.
Routing Slim
<?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