From 3a34a99694c68256be700fa7e6d7553ad9256994 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 1 Aug 2014 23:51:30 -0500 Subject: [PATCH] Working on default route setup. --- .gitignore | 1 + app/controllers/HomeController.php | 4 ++-- app/routing/routes.php | 7 ++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index b5363f02..6d67fa06 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /bootstrap/compiled.php +/app/routing/cache.php /vendor composer.phar composer.lock diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index ede41a7a..a1b5890f 100644 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -11,11 +11,11 @@ class HomeController extends BaseController { | based routes. That's great! Here is an example controller method to | get you started. To route to this controller, just add the route: | - | Route::get('/', 'HomeController@showWelcome'); + | Route::get('/', 'HomeController@index'); | */ - public function showWelcome() + public function index() { return View::make('hello'); } diff --git a/app/routing/routes.php b/app/routing/routes.php index e2591227..8b5277a7 100644 --- a/app/routing/routes.php +++ b/app/routing/routes.php @@ -20,11 +20,8 @@ | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to -| and give it the Closure to execute when that URI is requested. +| then declare the method to execute when that URI is requested. | */ -Route::get('/', function() -{ - return View::make('hello'); -}); +Route::get('/', 'HomeController@index');