[Laravel] Resource

1、app/routes.php:

Route::get("users", "UsersController@index");
Route::get("users/{username}", "UsersController@show");

2、在指令列執行php artisan routes,會出現:

Screen Shot 2014-05-06 at 10.57.11 PM

3、app/routes.php改成:

//Route::get("users", "UsersController@index");
//Route::get("users/{username}", "UsersController@show");
Route::resource("users", "UsersController");

4、在指令列執行php artisan routes,會出現:

Screen Shot 2014-05-06 at 10.59.17 PM