Improve comments in routes.php.
This commit is contained in:
parent
ce39e48458
commit
84f05fd3ee
|
@ -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
|
||||
|
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue