Created
August 25, 2013 14:38
-
-
Save nWidart/6334183 to your computer and use it in GitHub Desktop.
route closure example
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 | |
| //http://example.com/users | |
| Route::get('users', function() | |
| { | |
| // Récupère tout les users de la DB | |
| $users = User::all(); | |
| // Crée la vue qui liste les users | |
| return View::make('users')->with('users', $users); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment