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

Pendo's avatar
Level 10

How to start learning Laravel

Hi guys!

So... I've been wanting to start to learn Laravel for almost 2 years already. But everytime I start I kind of get stuck questioning myself how I'm going to start with it. The main reason for questioning this is because I'm running my own business meanwhile and most of my time gets spended at running projects.

I've been noticing ever since I started that these running projects keep me at the same place. Ofcourse there will be some projects to require the best of myself and make me explore new things. But most projects are "same old" things as I've been doing in the past 5 years.

I also must say that I've been using a rather old way of working (but, it fits me and I work pretty quick): I use Dreamweaver to edit my code, connect to a FTP and download the lastest code, make my changes, upload and test the editted file(s). My server takes care of all kind of back-ups etc. So it works for me and my clients, but I'm getting the feeling that I need to switch to a more modern way of working. Not just for myself, but also for my employees in the future (I don't have any yet, but working in teams just doens't work this way).

So, yeah, back to the question: how do I start? I've got some things listed already but maybe someone can clear/perfectionize some things for me.

  1. Offline development using Vagrant

I already installed all needed tools to run a Vagrant server on my own system to develop offline. This tackles my problem that once in a while my connection drops for a day and making it impossible to work. Vagrant seems like the best option, but I'm not quiet sure what I need to know about Vagrant (for instance: how to alter the configuration of the server, how to run an older PHP version for my older code, etc.)

  1. Using a versioning system (Github/Bitbucket)

Last mentioned is pricewise the best option to choose, but if I'm correct they both work exactly the same way. I've done a few things using Git already, but I still need to familiarize the commands and make them my second nature.

As far as I know, Git will help me keeping my code at one place (the online repository) and making it easier to download and alter the code on multiple device and push them back to the main repository. If I would, for example, create a CMS and store it in a repository I would be able to clone these repositories to client websites and with a single command upgrade all these website at once? Also, Git offers me a simpler way to restore code to previous states.

  1. Learn Laravel

After Vagrant and Git are understood, it's time to learn Laravel. I've got a pretty good background and knowledge in PHP. But since I've been working the same way for years, I've never really had a good moment to switch to OOP/MVC (just partially). Both ways of programming seem to be the essentials before starting with Laravel.

After both are familiar (and I think they are already), it's time to kick things of with Laravel. The Essentials course must be the right one to start with? Would you guys recommend starting with L5 at once, or is it wise to start with L4 anyway?

  1. Change my editor

Dreamweaver is a great tool, I've been using it for over 15 years now (back from the days Macromedia was the owner). Having this said, you can understand that the routine of using the software is enormous and changing the tool will have a huge impact on the speed I develop my code with.

I've downloaded a few and tested some. And I must say that Sublime Text is one that really catches my eye and seems to be working great. The one thing I'd miss is an FTP functionality but I recon I can still use Dreamweaver for the older projects (it's in the Adobe Creative Suite anyway).

Hopefully someone can give me a good guidance in what I should start to learn and the path that is most easy to follow.

Thanks for thinking along!

0 likes
42 replies
skinnyvin's avatar

Just pre-ordered your book Martin. :)

I have been learning using Laracasts, but my main frustration is the code incompatibilities from the older videos and Laravel 5. I guess this can't be helped. So your book will be a welcome addition!

Pendo's avatar
Level 10

Vagrant should be Homestead I just noticed. I'm gonna buy the book aswel Martin. Hopefully it will be of any help. I see it will be released anytime soon, thats great!

martinbean's avatar

@skinnyvin @Pendo Thanks, guys. That’s most appreciated :)

I’m not sure on the firm release date, but I’ve literally just finished reviewing the pre-finals, which is the version that’s sent to be proof-read before printing, so not long now!

andy's avatar

@Pendo

Great! You've got yourself a business proposal put together. You've chunked it down to 4 easily understood parts. AND! You've put forth a plan of action/attack.

IF you mentioned your pc OS we could recommend some solutions that might be good alternatives. I'm pretty sure that sublime and phpstorm have FTP ability. On OSX I use cyberduck (I'm old school that way). Also, you can almost think of git pull/push as FTP. It might not be the best solution but I use git to manage my file transfers and then go in with Cyberduck to do some things that shouldn't really be done with git.

The biggest issue I see with what you have got going is that you will run into a lot of perceived "lost time" which normally is translated as lost revenue. Just keep remembering that any movement to a newer system will require a temporary loss of revenue that will normally equate to better earning potential in the future.

smadeira's avatar

I haven't used it but I hear good things about Homestead. It is Laravel development in a box so you are isolated from other stuff.

I use github for my code. I don't have anything secret out there so I'm using a free account. I guess if you have client specific stuff you are protecting you would want a paid account.

I would learn Laravel 5 and not worry about 4. You are starting from scratch so no use learning something that is obsolete. There are lots of resources here to watch and read to get you up to speed. There are two learning curves with Laravel. The first and shorter one is installing and then building a website that uses Laravel. That's pretty easy. As you become more advanced and want to do more complicated things there is a steep learning curve as you learn the guts of how Laravel is built and how you tie into it. Just be aware that there will be time involved in learning the deeper you go.

PHPStorm gets my vote. It does almost everything for you, links well with github so you can do commits and pushes right from the IDE. It has a good debugger so you can step through your code when you need to. I don't use them, but it does have FTP capabilities.

Hope that helps!

skinnyvin's avatar

I would recommend getting Homestead set up. I am on Linux and if I want to do some more learning ( or, when I have learnt enough an actual Laravel Project of my own) - it is really easy to spin up another folder/domain/install to work with eg my steps:

After issuing 'homestead up' I 'homestead ssh' into the box:

  1. To set up a fresh Laravel install, cd to my Code dir then:
     laravel new <mynewfolder>
  1. Get nginx to serve a dev domain:
    serve mydomain.dev /home/vagrant/Code/<mynewfolder>/public
  1. On my host machine I then edit /etc/hosts to add an entry for mydomain.dev:
    192.168.10.10 mydomain.dev

As you can imagine this is refreshing as I know I can have a blank canvas ready in about a minute or so.

I use Sublime Text, but I really would like to get PHP Storm running on my Ubuntu machine. It looks like it has some amazing timesavers/helpers.

1 like
Pendo's avatar
Level 10

Thanks for the great replies so far! I'm on OSx both in the office as on the road (imac and macbook). My choice for Sublime was based on some video tutorials I viewed earlier by Jeffrey Way over at Tutsplus. But I reckon it's worth looking at PHPStorm aswel since I'm starting of fresh with one of them.

I understand that losing time is an unsolveable part of the road to learning something new. Although, that has been the reason of postponing it everytime unfortunately. There are so many plans I'd like to do and so many things I'd like to learn that having a solid plan is essential to prevent myself from quitting during the proces again :-)

Are the steps I mentioned in good order? I can imagine that learning Laravel is a step that happens along with learning a new editor. I'm not sure about PHPStorm but SublimeText has some great tools to work with Laravel. Homestead is quiet easy to set up, it just needs some time to memorize all commands that are used.

My biggest "issue" so far is the use of Github. As I said I'm aware of the benefits as it comes to versioning, storing, pulling, pushing etc. But is my example possible in the real world? So, let's create a case:

I'd create a basic website on my local machine (and sync it with a repository online: "Basic-Master"). I would then create 5 websites based on this repository and customize them (templates, images, javascript) resulting in 5 different websites running the same "basics".

Q1: Would I make 5 seperate repositories per website? ("Basic-Site1" - "Basic-Site2") Q2: Would I be able to update the core of Website 1-5 with a single command if I update the "Basic-Master" repository?

I'm not sure if I'm able to explain properly what I'm after. In one line it's: I'm looking for a way to create a single main CMS source that can be deployed to multiple websites (and customized at each website) and being able to update all main CMS files of all websites by pulling the last updates from the main source (without overwriting or deleting any custom files).

I know it's kind of "offtopic" as it's not totally Laravel related, but it's part of the possible changes I'm planning to make along with learning Laravel.

andy's avatar

Editor: If you offer open source projects IntelliJelli will give out a free license. I have one but hardly use phpStorm since I'm a pretty diehard fan of BBedit (old school MacOS editor). Eother Sublime or phpStorm is really good. I'd check for plugins and what not to see how you could maximize your time spent in each editor.

Homestead/vagrant vs plain OSX: I use just OSX. Why? It's what I've been doing since pre-beta OSX that's why. Vagrant's advantage is being able to spin up almost any variation of Linux within minutes (time varies according to your bandwidth). This means you can target client's system with ease. Disadvantage is that I find it way slower than just working straight with OSX. OSX's biggest catch is that it's not case sensitive. F'This! I've spent a lot of time debugging an issue only to find out that a directory's name was lower case.

I know that you mentioned vagrant but I thought maybe you might have overlooked that OSX is basically a fully functional server from day of purchase. It's just a variant of BSD compared to a Linux distro.

Your attack plan: Like I said is sound.

Git vs Bucket: Don't know enough to give an opinion.

Version Control Handling: I am doing something similar as you want to do. I have a main core repository and then update several sites from that. I also have a public facing repository and another one that is purely dev work. More than likely I could do the same if I took advantage of git more; using tags, versions and such. However, I tend to be old school at times and just pick up new git commands as needed versus going all out and doing the "git" way.

You will need to be aware that if your various sites vary too much from the main core application you will have issues so you should look into really getting git down. Or you could design your code around modules and then have those modules under git control. The app that I work on the most ( https://github.com/illuminate3/rakko ) follows the module idea. This way I can have repositories that are open and closed. I pull what I need, make sure that my core app always considers the various possible combinations (this helps with keeping code organized for me) and I can manage what I need to do at my own pace.

olimorris's avatar

Hey @Pendo , you're in a similar position to the one I found myself about six months ago.

My back story is a little different but somewhat comparable. I got heavily into PHP and MySQL back when I was a geeky teenager but after deciding that I didn't want a career in web design, I changed paths and now find myself in management consultancy. But those were old times my friend...PHP 4, Netscape Navigator and Macromedia definitely still around and I distinctly remember using tables instead of CSS hehe.

Anyway back to the point. Six months ago, with a fledging idea in my head that I wanted to develop, I picked up the tools I'd downed some years ago and discovered...everything had massively changed in the web design space. I likened it to being in a coma for a decade or like in The Walking Dead when Rick get's out of the hospital to find his whole...world...has...changed!!! So six months ago after a tonne of reading on MVC frameworks and knowing that I wanted to use the pretty solid foundation I had in PHP, I embarked on the journey that has been Laravel.

So like yourself, there's a bridge that needed to be crossed in order to get to a better place. I thought I'd share some of the tools that I've needed to learn in those 6 months. I've grouped them up into common themes so hopefully they're of some use.

Laravel

  1. Codebright by Dayle Rees - This was the book I read prior to even installing Laravel 4. I wanted to know what the fuss was about and you'll either love or hate Dayle's writing style. I found it okay. However his examples and ability to explain basic topics are great. It's not a perfect resource, I've not looked at it since I first read it but it explained the basics well until I discovered Laracasts. Now L5 is out, this book look's like it might be pretty handy.
  2. Laracasts - @JeffreyWay is too humble to acknowledge the role he plays in making Laravel such a great framework and PHP, such a great language to develop with. I actually live on this site. It teaches me everything. When I'm explaining complicated financial topics to clients at work, I imagine how Jeff would explain it hehe. There's so many good series that will teach you so much about modern PHP programming that it's a resource that you'll never want to give up.
  3. Laravel 5.0 Docs - A lot of people seem to say recently that they don't like the Official Laravel docs. I personally think they're awesome and they should be your first port of call when you need a quick answer to a quick Laravel related question. I think those people expect to find a fully tailored answer everytime...and when that's the case just use StackOverflow or these forums
  4. Laravel: From Apprentice to Artisan - As you progress through Laracasts and general reading of tutorials you'll hear the word SOLID and it's component parts as well as terms like IoC. Taylor Otwell's book explains these complexities well and is generally a good book to have on hand as a reference.

Workflow

  1. Laravel Homestead - I used to use XAMP on OSX and you could guarantee one OSX update later and you'd lose a day friggin' debugging the thing. You mentioned you're using it in an earlier post so I won't bang on about it. If you have some spare $/£/€ then consider buying the VMware Vagrant plugin...it's super fast!
  2. PHPStorm - I used Dreamweaver and latterly Coda before I saw Jeff's series on PHPStorm. If you're productive in Dreamweaver then you're going to be super human in PHPStorm. It took me a while to remember all of the shortcuts but being able to refactor at the press of a few keys and import classes in two keystrokes saves a phenomenal amount of time.

Version Control

  1. GitHub/BitBucket - For me, Git was far from simple when I first picked it up. I wasn't really sure why I needed it and if I should really bother. If you're a one man band then version control is not as necessary as if you're working in a large team. However being able to return your code to a previous version if you really mess something up, could be important. Also, I like a nice audit trail. A lot of web services also hook into GitHub and BitBucket and can listen to git push events in order to trigger things...this can be very cool! I prefer BitBucket currently as it is free for up to 5 private repositories.

Anyway, some good Git resources for you are:

Hosting/Deployment

  1. Laravel Forge in combination with DigitalOcean or Linode - The world of how a website is served has radically changed since my early days. Infact, I've not touched an FTP editor since 2005! If you use version control (GitHub etc) then a wonderful tool like Laravel Forge can be alerted when you have made a 'push' to your repo and copy the code to your server and voila. As simple as a git push command in the terminal. Of course Laravel Forge is much more than this and used in conjunction with DigitalOcean or Linode, it can completely provision (i.e. make) your server in the cloud. So for $15 you have a super fast server and a great tool to enable fast deployments...and one that is built to serve your Laravel applications!
  2. Codeship - To ensure that your code is fully functional before you make the big leap to the production server, Continuous Integration tools like Travis CI and Codeship can run your tests for you. These tools mimic the production environment and can alert you if you're code is ready to be deployed.

There's a lot more things that I've picked up in the last 6 months so I'll add them to the list when I remember.

5 likes
SP1966's avatar

I'll toss out Github's Atom Editor as a very nice, and free alternative to Sublime! They're on the verge of their 1.0 release and as recently as a couple months ago it was on the slow side, they've really gotten it optimized and it feels every bit as fast as Sublime. Take a look before you throw down money on another text editor!

I'm sure @JeffreyWay is a busy guy but I would be interested to hear his take on Atom!

1 like
SP1966's avatar

@olimorris

You have an error in your post regarding Bitbucket, the free account lets you have as many private repositories as you like but only five users on your team.

1 like
Pendo's avatar
Level 10

Wow, @andy and @olimorris, thanks for the time spend to answer my questions. Much appreciated. Sounds like I've got lots to learn and change in my workflow. But I'm up for the challenge I guess!

I know OSx has the ability to host websites. But I'm not much of a server administrator and lack the knowledge on many parts, plus I'm used to using a GUI and the console still feels a bit strange to use and I've learned that the console is an important part when running a server on your OSx. I'll get there eventually, but Homestead definitly was so much easier for me to use that I'll stick there.

I've already have most of the books you mentioned @olimorris, I'm about to buy Easy Laraval 5 now, looks like a great book to have aside and follow when starting with L5.

As it's been a little while since I last used Homestead/Vagrant, can you briefly explain the benefits of VMWare Vagrant? And what are the main differences between "just Vagrant" and "Homestead". It looks like Homestead is some kind of "easy-to-setup-Vagrant-Laravel-environment" with good presets for L4/5?

I might have been unclear, I'm not looking for answers regarding the choice between Git and Bucket, I went with Bucket a few months ago because they offere unlimited private repositories and charge you for team members. For now, I'm just by myself and sometimes a former intern, so Bitbucket is good! For all my open repositories I'm going with Github, not sure why.. I guess because I'm used to place them there. I just need to make the "Git" way of development and commands a second nature by practicing and using it alot.

Laravel Forge is something I came across a few times already. But I'm having a VPS for my clients already, so unless theres a good reason to go for Forge for my future projects I'd rather stick with what I'm having. Although I can imaging that Forge is better configured to use with Laravel than my VPS. I'm open to all suggestions as you've noticed! And Codeship looks nice, but the prices are to high for me to invest right now, maybe later on!

@SP1966: my choice for either PHPStorm or SublimeText is because of the great video tutorials I've came across. Thanks for the suggestions though, but having another option to choose from and test with might make the choice to hard :D

olimorris's avatar

@Pendo - Regarding Homestead with Virtual Box and Homestead with VMWare...it's mainly just speed improvements. They do the exact same job.

You'll get used to Git and when you become more familiar you'll likely grow to quite like it. I'm a big fan but it felt very unnatural at first.

Codeship has a free tier btw! Free for private BitBucket repo's and 100 builds a month. I used to use Travis CI but the price for private repo's is ridiculous.

1 like
Pendo's avatar
Level 10

Okay, well, for now I'll stick with VirtualBox for a while since that worked while testing it using the videos here at Laracasts. Changing to VMWare might be something for the future if everything related to what I'm about to learn is clear to me ;)

Pendo's avatar
Level 10

Looks like PHPStorm is a great IDE to start working with. I've kicked of with the IDE change because I most likely will use the features of the editor during the learning process of Laravel. Anyway, currently tuning up the settings and getting to know the functions they're a little off to what I'm used to ;-)

theUnforgiven's avatar

PHPStorm, is the best IDE works great with Laravel too, learn Git, watch Laracasts, I started by doing one or two episodes on a night in bed, get some books - https://laracasts.com/recommended-reading then just install via the installer or composer, and just code and see how far you get, always come back to these forums for help, plenty of knowledgeable people including @JeffreyWay himself will offer help and advice too, so don't be afraid, dive in and do some code, that's the best way to learn and learn by your mistakes. Best advice I could give anyhow & I hope all goes well.

Happy learning and happy coding! :)

jekinney's avatar

I use github as a free account mainly for compatability and GUI tools. I also use Bitbucket because they have free private repository too. So as was mentioned all my base code is stored on guthub client and private projects on a private repository on bitbucket.

Private repositories on github add up quick money wise.

martinbean's avatar

@skinnyvin Thanks for the heads up. I got an email from Packt this morning to say the book had been published too. Thanks for buying the book and hope you enjoy it!

Pendo's avatar
Level 10

I haven't been notified yet, hopefully it arrives soon. Can't wait to start working with Laravel! Didn't have time this week to learn, I guess I'm also going to view the OOP series just to refresh everything at once (OOP/MVC isn't in my daily workflow either).

Thanks for the help all!

Teranode's avatar

How I started working on Laravel: Got Basic PHP Knowledge and just dove right into Laravel 4.2.x :P (Til L5 came out and then my head exploded, but im all good now). I use Laragon to make Laravel Environments. cause it's easier for me and I dont like Virtual Environements unless it has to do with a new OS.

tgif's avatar

@martinbean Do you think it would be a good idea to include a chapter on the coming changes in Laravel 5.1?

martinbean's avatar

@csuarez The book has already been published. The content was also finalised in April as Packt needed time to print the book.

There are notes for things changed in version 5.1 (such as the Events folder getting renamed to Jobs) but not a lot was set in stone for 5.1 by the time the book went to print, so I didn’t want to fill the pages with hints that may be outdated or wrong by the time the book was in people’s hands.

tgif's avatar

Thanks @martinbean just looked at the table of contents and it looks great. Congrats to Cameron BTW!!!

Next

Please or to participate in this conversation.