Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Laravel 4 Basics Getting Started with Laravel Laravel Folder Structure

Ran ShemTov
Ran ShemTov
14,148 Points

Updating the course to use Laravel 5

It seems like Laravel has changed alot since Laravel 5. Since I was installing it individually on windows, I got the newest version and It's very cofusing following along when I have tons of different stuff and I need to find another way to understand the instructions.

7 Answers

Chris Shaw
Chris Shaw
26,662 Points

Hi Ran,

You can follow along with the course if you run the below command instead of just the composer command shown in the video, the difference is the version is set within the command which pulls down 4.2 instead of 5.x.

composer create-project laravel/laravel {directory} 4.2 --prefer-dist

Hope that helps.

I am probably going to get some heat for this... but as a developer you have to adapt when a framework changes. No one is going to sit there and hand hold you. Click around and figure it out. That is the best way to learn and what I look for when I hire. Most laravel workshops / tuts out there are based on 4.x at this time.

This might be useful: http://laravel.com/docs/5.0/upgrade

That being said, adding some more professor notes would be beneficial. Especially as TeamTreeHouse users are maybe using a PHP Framework for the first time.

For example:

If you are using the latest dist of homestead on a mac, after cloning homestead.git, run bash init.sh (as the official documentation indicates). You will then find Homestead.yaml in your home folder ~/.homestead/Homestead.yaml

Once you have installed your laravel 5 project, the following folders have changed:

/app/models - no longer a specific folder. Laravel now allows the developer to choose where to put the models. The default is in the app root. Some developers may choose to create a models folder, some may not.

/app/views - no longer there. Now /resources/views/

Routes.php is now under /app/http/

etc etc

laracasts.com also has some good screencasts going over the changes in Laravel 5 vs. 4.

Hi Rhian,

Could you link me those Laracasts please? I've come across a fair few and was curious as to the ones you found that went over the changes in Laravel 5 vs 4.

Thanks :)

Ran ShemTov
Ran ShemTov
14,148 Points

So I must correct myself. not only the Laravel itself has been updated and it is a nightmare to follow, but also the Homestead has changed. for example, the yaml file is located in src/stabs folder. This has turned my 2 days fixing advanture into a nightmare and after 2 days learning Laravel I gotta delete everything and start from scratch.

That's pretty annoying. Also, I would suggest (from the point of loving Treehouse, really), to add atleast some hints for Windows users.

Jacob Cox
Jacob Cox
48 Points

The only reason I was tempted into TeamTreehouse was the Laravel section. Specifically someone had stated it had good content for somebody looking to learn Laravel 5. I mean its labeled for beginners... Clearly they didn't realize this is a Laravel 4 course. I don't really see the point of learning 'ideas' and 'concepts' that have already changed. Sure Laravel will always be a moving target, but L5 will have a LTS version... why not a course on something that's going to stick around?

To make things worse it shows you how to make a todo list. Why are 90% of classes on laravel about a todo list... what a turn off. I don't see myself having a future at TeamTreehouse at this point.

Konrad Pilch
Konrad Pilch
2,435 Points

Lol, To do List. A basic, thingy to do. Get you started in it.Learn few concepts. It doesnt matter if its laraver 4 or 5 . Ibelieve concepts, ideas, logic is still pretty the same . YOu can learn them, and seek for help if outdated. Plus, you cant judge treehouse by one course. Lots of students are following this , including me on windows 8 , sure , its not the nicest thing, but it works.

Plus , updating the same courses would take a lot of time, while treehouse , as you see, has pretty a lot of stuff.

IMPORTANT

Treehouse teach you the basics of everything. With basics you can learn more stuff, whatever you want. The basics are the most important. Like you cant fight, without basics, after the basics, you can go and fight because you know how to punch , kick etc.. without the basics, you can hurt your self as a 'punch' is not thath straight forward to make it a good punch .

Its up to people anyways to do what they want. Id just say, dive more .

jason chan
jason chan
31,008 Points

Hey I found a work around. Just install xampp since your on windows. Then install composer. Then install laravel package through commandline.

http://abuango.net/2014/08/16/how-to-install-composer-on-windows-with-xampp/

I hope this helps. I didn't bother with virtualbox and vigrant. I did install vbox with ubuntu lamp server tho. Yes I'm odd guy not following convention. LOLs.

Henrique Voni
Henrique Voni
12,296 Points

I may agree with Ryan Thomas, because there's no better moment to learn than when you most need it. There are many changes from 4.2 to 5, but i'm encouraged enough to give a try on this course. Anyway, Treehouse should update this course or teacher notes :)

Rajender Kumar
Rajender Kumar
836 Points

Yes, I also feel that team tree house should teach the latest version of any technology.