Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dgtlmoon's avatar

Broken newcomer documentation :(

Hi

I'm new to laravel and wanted to start learning this framework fast..

http://laravel.com/docs/4.2/quick

First problem

"To get started, let's create our first route. In Laravel, the simplest route is a route to a Closure. Pop open the app/routes.php file and add the following route to the bottom of the file:"

I put the routes.php in myapp/app/routes.php but nothing happened when I ran the site, I moved it to app/Http/routes.php and it worked (Is there a versioning bug here?)

Second

"ext, we'll create a simple view to display our user data. Views live in the app/views directory and contain the HTML of your application. We're going to place two new views in this directory: layout.blade.php and users.blade.php. First, let's create our layout.blade.php file:"

So i created app/views and created those two files in that myapp/app/views directory but again, nothing happening

Please help!

0 likes
43 replies
mstnorris's avatar

@dgltmoon if you're starting, then don't start with Laravel 4! The latest version is Laravel 5.1. You can view the docs here.

Was there any specific reason you started with Laravel 4.2?

dgtlmoon's avatar

Why is that? So there is a problem in the documentation?

mstnorris's avatar

@dgtlmoon not that there is a problem with the docs, but why start on an old version?

Can you run php artisan --version form the command line within your project root so we can determine what version you're actually running.

dgtlmoon's avatar

Because I don't know anything about Laravel, I googled "Laravel" and clicked on "quickstart", how am I meant to know it's an old version? Perhaps a notice at the top of the documentation stating that would be good for us newcomers

See http://www.zimagez.com/full/07beefc486057d42817defaa1cf6b754e210d46d213b4f5c6924c0fb25bf0a9d14ddd5de559687b973d5c638b0a8f5dcb774bc740068a753.php

If the default landing page is the wrong version, then there is a bug - still it doesnt explain why that tutorial did not work?

dgtlmoon's avatar

Sorry, yes thanks, ok so its...

$ php artisan --version Laravel Framework version 5.1.1 (LTS)

dgtlmoon's avatar

Is it possible to report a bug that someone should fix that page? perhaps the installation step should lock it to 4.x

dgtlmoon's avatar

@Ruffles yes but no one has addressed my initial problem - there is a bug in that documentation - it assumes you've installed 4.x but does nothing to ensure you're running 4.x

It's the landing page us n00bs find when we come from google

davorminchorov's avatar

There's no quick start page for laravel 5.1, that's why you were redirected to that page.

dgtlmoon's avatar

@mstnorris Yes I know that, and I diligently followed the quickstart guide and ended up with 5.1 and none of the quickstart steps working - because drumroll how was I meant to know following the installation steps in 4 would install 5??

graham's avatar

@dgtlmoon you can't really describe it as a bug. If you pick up a book do you open it in the middle and start reading or do you take a look at the cover first.

http://laravel.com <- that's the cover

1 like
mstnorris's avatar

@dgtlmoon I kind of see what you are saying, but as @Ruffles said you can pull in a specific version, but what were you doing on the Laravel 4.2 docs anyway, instead of the latest 5.1.

davorminchorov's avatar

It does show the version on the top of the page (and in the link on google)

graham's avatar

@dgtlmoon you would have realised the quickstart is an archived/legacy document is you'd started at the beginning.

1 like
dgtlmoon's avatar

@Ruffles sure, but how am I meant to know that the installer from the 4.2 documentation actually installs 5.1 and none of the following document applies?

mstnorris's avatar

@dgtlmoon at the time Laravel 4 was the latest version so it wasn't aware of anything else so it was just pulling in the latest version for that time.

It just so happens that it uses the same method, which, as it happens, pulls in the latest version, it just now happens to be Laravel 5.1.

Accept it and move on my friend. Watch the Laravel 5 Fundamentals series and you'll be fine.

1 like
davorminchorov's avatar

Tip for next time: go to the official website first, then go to the docs. Also, check the latest version before reading the docs.

dgtlmoon's avatar

@Ruffles Yes that would work - or just put a note at the top of the 4.x quickstart that the following document will not work

davorminchorov's avatar

It will work, if you specify the version when installing the framework.

composer create-project laravel/laravel=4.2.* your-project-name 
dgtlmoon's avatar

Well it's no loss to me, up to you guys to keep arguing, just saying that from a newcomers perspective, a little note would have gone a long way - yes ofcourse I could specify the version, but why doesnt the install step mention that? it's only one page, surely someone could update it

thanks for the enlightenment

dgtlmoon's avatar

@Ruffles yes, works fine, thanks. I think the confusion from just hitting the google link and landing completely out of context

mstnorris's avatar

@dgtlmoon we're just trying to explain the why for the question you asked. Did you read my response above?

graham's avatar

It probably wouldn't hurt to highlight that the older documentation is not the latest version. I'm not sure I'd land on an unrelated site and start describing it as a bug though. A bug is something entirely different.

mstnorris's avatar

@Ruffles that isn't the point (I don't want to encourage using older versions). Yes you can specify older versions, and @dgtlmoon obviously used an outdated link to the docs, but as I said; at the time the 4.2 docs were written, that was the only way. Which hasn't changed to date.

graham's avatar

@dgtlmoon agreed, good documentation is everything. The new documentation is fantastic. It's just a shame you got distracted by the old versions for a while, I can see how that would have confused you.

Next

Please or to participate in this conversation.