From 84f05fd3ee4d28e378eae8a684a74a65efc99a84 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 28 Jul 2011 13:20:57 -0500 Subject: [PATCH] Improve comments in routes.php. --- application/routes.php | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/application/routes.php b/application/routes.php index a596b28c..20af4c8f 100644 --- a/application/routes.php +++ b/application/routes.php @@ -10,10 +10,32 @@ | Here is the public API of your application. To add functionality to your | application, you just add to the array located in this file. | - | It's a breeze. Simply tell Laravel the request URIs it should respond to. + | It's a breeze. Simply tell Laravel the HTTP verbs and request URIs it + | should respond to. The GET, POST, PUT, and DELETE verbs are all + | recognized by the Laravel routing system. | - | Need more breathing room? Organize your routes in their own directory. - | Here's how: http://laravel.com/docs/start/routes#organize + | Here is how to respond to a simple GET request to http://example.com/hello: + | + | 'GET /hello' => function() + | { + | return 'Hello World!'; + | } + | + | You can even respond to more than one URI: + | + | 'GET /hello, GET /world' => function() + | { + | return 'Hello World!'; + | } + | + | Allow URI wildcards using the (:num) or (:any) place-holders: + | + | 'GET /hello/(:any)' => function($name) + | { + | return "Welcome, $name."; + | } + | + | Ready to learn more? Check out: http://laravel.com/docs/start/routes | */