Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Laravel 4 Basics Project Setup Introducing Routing

Adrian Gordon
Adrian Gordon
9,008 Points

This Course Is Way Out Of Date

Almost none of the information being presented (up to this point) here matches up with the current iteration of the framework. Sad, I was looking forward to learning it.

4 Answers

Matthew Bingham
Matthew Bingham
11,927 Points

Feeling the same as Adrian Gordon, although I believe that resolving these types of issues (software updates) yourself makes you a better developer.

I've spent a few days setting up the laravel environment on my windows machine - which took a while because the paths, commands and file locations are different.

I've just been stuck on the following routes.php files not working correctly for a while now (and also a change of location for the laravel 5 framework) - but I've just resolved this. For anyone using Windows and updating the routes file to *"Hello world."/, you may want to try changing the following.

Current /app/Http/routes.php file

Route::get('/', 'WelcomeController@index');

Route::get('home', 'HomeController@index');

Route::controllers([
    'auth' => 'Auth\AuthController',
    'password' => 'Auth\PasswordController',
]);

Updated /app/Http/routes.php file (as per video)

Route::get('/', function()
{
    return "Hello world.";
});
Greg Kaleka
Greg Kaleka
39,021 Points

Nice - FYI, your changes are not at all specific to Windows, so everyone should be able to use it :).

An alternative is to actually leave the line Route::get('/', 'WelcomeController@index'); alone, and instead, edit the index() function in Http/Controllers/WelcomeController.php. Below, I've simply commented out the existing return statement and written my own.

This is actually probably a better solution, since you can manipulate the index function the way Hampton is manipulating the anonymous function in routes.php in later videos.

WelcomeController.php
public function index()
{
    // return view('welcome');
    return "Hello World";
}
Adrian Gordon
Adrian Gordon
9,008 Points

I knew this would happen. that is why I switched to laracast.

Adrian Gordon
Adrian Gordon
9,008 Points

Trust me G, I understand that is is near impossible to come out with an up-to-date course so soon after the release of the last version of the framework. I was simply stating facts.

fact 1 : The course is ( currently) out of date.

fact 2: I was looking forward to learning the ins and outs of the laravel framework on treehouse, and am sad that I will not to be able to do so (at this very moment).

I don't really see the issue here, but I will apologize all the same. You guys are running an amazing service !!

Andrew Shook
Andrew Shook
31,709 Points

You do realize that Laravel 5 was released February 4th of this year. So the content is only a few months "out of date". It also takes time to produce the videos that they offer here at treehouse.

what about now?

... still no update march 2018 .... back to youtube i guess ://

Michael Walker
Michael Walker
45,428 Points

Well Andrew it's been almost 3 YEARS since you posted this and the class is STILL out of date. I am not very happy with Treehouse right now. I learned more in 30 minutes on Laracasts than I did spending 3 hours in this course. Even better the Laracasts are free and Treehouse is still taking my money. Just UPDATE the darn class already!!!!!!!!!