Learning is not usually a big problem, but how to learn is what matters the most.
Welcome to the second part of this series on Laravel PHP framework. Consider it as the first part (since part 1 was just an introduction) on how to tackle the Laravel framework. In here I will prepare you to learn Laravel.
Make up your mind to learn Laravel framework today and let's go.
I know that there are many good tutorials out there on how to start using Laravel PHP framework. But there are also tons of people like me who could not really find their way out of the lot because of how the tutorials are actually delivered.
It's very hard to have a complete tutorial for free on Laravel which can give you everything step by step. There are good resources spread all around the web.It becomes confusion to someone who has no prior notion on Laravel or who has never used a framework to find his way. Going through many websites looking for where exactly to start from becomes very tedious task to do. Plus, some of these resources are sometimes outdated.
So, in this chapter I will define the steps to follow and provide a complete guideline for these series of tutorial and define your learning curve at the same time. The tutorial will mainly be based on Laravel's official documentation structure. That way we know that we are covering everything and we can stay up to date.
Choice of version
Before we start coding with Laravel framework, let me make things clear on the version to use so that you will not be like should I use version 4, 4.2, or 5, etc?.
Why this matters?
It matters because from one version to another the learning curve differs seriously. Lot of things usually change. So I have decided to go for the version 5.1 which is the latest. The main reason why I chose it is that it's the first version of Laravel to receive a Long Term Support (LTS). This version will receive 2 years for bug fixes and 3 years for security fixes. That gives us a lot of time to enjoy it. At the same time it shows that the version 5.1 covers a wide amount of resources that could be up to date for the next 4 to 5 years. And it's quoted in the documentation as:
Laravel 5.1 is the first release of Laravel to receive long term support. Laravel 5.1 will receive bug fixes for 2 years and security fixes for 3 years. This support window is the largest ever provided for Laravel and provides stability and peace of mind for larger, enterprise clients and customers.
Read more on the LTS:
https://en.wikipedia.org/wiki/Long-term_support
http://laravel.com/docs/5.1/releases#laravel-5.1
https://laravel-news.com/2015/04/laravel-5-1/
But if you use other versions too it not a problem. I made a just and it's personal.
Resources
In order to stay focused and be on track, I have made a small list of some sources you may need along this tutorials, or even at anytime.
They are places where you can have either beginnners guides, help, tricks, solutions to particular problems, packages, etc. This will help you stay up to date every time.
documentation
tools
- Laracasts
- List of all commands you will be using
- Non non-sense receipies
- Tricks and tips
- Directory of Packages for your Laravel projects
- PHP-FIG
conferences
communities
- Laravel IO
- Discussion on Laracasts
- Live chat with Laravel creator and team
- Laravel on twitter
- Laravel repository
Now you know the Laravel universe.
PHP Notions to know
Nothing is really for free. There is always a little price to pay. Here is some notions and concepts I think are a must before you understand very well Laravel framework likewise most of them.
Understand HTTP requests
To end this part I would like to take you through something many people take for granted and that represents a core element of the web and for the Laravel framework: HTTP requests.
In the first part I mentioned that Laravel framework has RESTful Routing. If you didn't understand that line, pay attention to following.
The HyperText Transfert Protocole is one of the most important things in the web. It's used any time you make a request via your browser or any client like cURL. By request I mean every time you open a website or click on a link.
You may probably be using Google Chrome or Mozilla Firefox as browser. To see what I am really talking about open the developer tool of your browser by typing F12
or right click on any page and choose Inspect Element
. Then activate the Network
tab and refresh your browser with F5
. You should see something similar to this:
Or if you have CURL
installed you can just type: curl -v lancecourse.com
. Some pleinty text will appear with >
or <
signs in front of each line. The >
sign represents a request
and the <
represents a response
from HTTP server.
If you click on any name, you get more details on that request like following:
What you should notice in this requests is the method
, the URL
. The method or the verb
defines in which manner the request should be done. If you have created an HTML form before you should know the GET
and POST
verbs. They are many other such as: PUT, DELETE.
The URL specifies which resource the action(verb) is going to be applied. if you have a url like lancecourse.com/tutorials
it should identify tutorials on lancecourse.
Such architectural style of communications representation is called REST (REpresentational State Transfer)
. It's often used in the development of web services applications. And one of its constraints is to leverage a cache. If you remember too, caching is very well supported by Laravel framework.
Quickly read more about the HTTP and REST here
So the reason why I made mention of it is that since Laravel supports RESTful routing and Caching it means you could(and you should) be creating RESTful applications with the frame. You should know how to manage your requests. You should know when to use each http verb. This is very important for any serious application.
Conclusion
That was a bit long talk, but necessary to put you on the track. This part is a side note you should have all along this series and often refer to it when you need information from other sources.
In the next part of this tutorial, we'll be installing laravel and talk about all possible things to do before, during and after the installation. So get yourself ready by visiting some of the links above and learning concepts you don't know yet; then stay tuned, the real action is about to start.
Last updated 2024-01-11 UTC