From 8443cef301f9231fe00b00357ae4d38fed68a717 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 24 Oct 2011 22:50:36 -0500 Subject: [PATCH] added some notes to the home controller. --- application/controllers/home.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/application/controllers/home.php b/application/controllers/home.php index 11cbc1e4..c9c3c189 100644 --- a/application/controllers/home.php +++ b/application/controllers/home.php @@ -2,6 +2,38 @@ class Home_Controller extends Controller { + /* + |-------------------------------------------------------------------------- + | The Default Controller + |-------------------------------------------------------------------------- + | + | Instead of using RESTful routes and anonymous functions, you may wish to + | use controllers to organize your application API. You'll love them. + | + | To start using this controller, simple remove the default route from the + | application "routes.php" file. Laravel is smart enough to find this + | controller and call the default method, which is "index". + | + | This controller responds to URIs beginning with "home", and it also + | serves as the default controller for the application, meaning it + | handles requests to the root of the application. + | + | You can respond to requests to "/home/profile" like so: + | + | public function profile() + | { + | return "This is your profile!"; + | } + | + | Any extra segments are passed to the method as parameters: + | + | public function profile($id) + | { + | return "This is the profile for user {$id}."; + | } + | + */ + public function index() { return View::make('home.index');