get( '/', function () { $template = << Slim Framework for PHP 5
Slim

Welcome to Slim!

Congratulations! Your Slim application is running. If this is your first time using Slim, start with this "Hello World" Tutorial.

Get Started

  1. The application code is in index.php
  2. Read the online documentation
  3. Follow @slimphp on Twitter

Slim Framework Community

Support Forum and Knowledge Base

Visit the Slim support forum and knowledge base to read announcements, chat with fellow Slim users, ask questions, help others, or show off your cool Slim Framework apps.

Twitter

Follow @slimphp on Twitter to receive the very latest news and updates about the framework.

Slim Framework Extras

Custom View classes for Smarty, Twig, Mustache, and other template frameworks are available online in a separate repository.

Browse the Extras Repository

EOT; echo $template; } ); // POST route $app->post( '/post', function () { echo 'This is a POST route'; } ); // PUT route $app->put( '/put', function () { echo 'This is a PUT route'; } ); // PATCH route $app->patch('/patch', function () { echo 'This is a PATCH route'; }); // DELETE route $app->delete( '/delete', function () { echo 'This is a DELETE route'; } ); /** * Step 4: Run the Slim application * * This method should be called last. This executes the Slim application * and returns the HTTP response to the HTTP client. */ $app->run();