home.php 1.18 KB
Newer Older
1 2
<?php

3
class Home_Controller extends Controller {
4

5 6 7 8 9
	/*
	|--------------------------------------------------------------------------
	| The Default Controller
	|--------------------------------------------------------------------------
	|
10 11
	| Instead of using RESTful routes and anonymous functions, you might wish
	| to use controllers to organize your application API. You'll love them.
12
	|
13
	| To start using this controller simply remove the default route from the
Taylor Otwell committed
14
	| application "routes.php" file. Laravel is smart enough to locate this
15
	| controller and call the default method, which is "action_index".
16 17 18 19 20
	|
	| 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.
	|
21
	| You can respond to GET requests to "/home/profile" like so:
22
	|
23
	|		public function action_profile()
24 25 26 27 28 29
	|		{
	|			return "This is your profile!";
	|		}
	|
	| Any extra segments are passed to the method as parameters:
	|
30
	|		public function action_profile($id)
31 32 33 34 35 36
	|		{
	|			return "This is the profile for user {$id}.";
	|		}
	|
	*/

37
	public function action_index()
38 39 40 41 42
	{
		return View::make('home.index');
	}

}