If you are stumbling in the process of learning laravel, you are most probably missing the basics you should have grasped before. Patience and persistence is the key to success in programming. This tutorial won’t teach you laravel but how to learn laravel. Stay patient and keep practicing.

how to learn laravel

Learn PHP

Unless you are jumping right into laravel, you should be having some basic understanding of PHP. If you are not even familiar with PHP, you should not waste your time on learning laravel or any other framework. You simply can’t learn laravel if you don’t know PHP. Head over to PHP’s documentation or get a nice book and learn at least basics of programming.

Object-Oriented Programming

Most of the time, you will be extending laravel’s code. So you will need to get a good hold on object oriented programming. To learn laravel, make sure you understand objects, classes, inheritance, encapsulation, abstraction and polymorphism.

MVC

Model-View-Controller is an architectural pattern often used in web development. Most of the frameworks in PHP are based on MVC including laravel. So before you learn laravel, make sure you understand the MVC pattern.

Design Patterns

Laravel makes use of many design patterns like builder pattern, facade pattern, factory pattern, repository pattern, strategy pattern and provider pattern. You can learn design patterns from books like Mastering PHP Design Patterns.

Testing

Testing is an important process of development but is also often ignored. Many people find testing hard as they never got exposure to testing. Head over to PHPUnit’s documentation and get a grasp on it. Laravel provides a good support for testing using PHPUnit.

Composer

Composer is a package manager for PHP. It is used for dependency management and autoloading. Laravel depends on composer’s autoloader for autoloading. So get yourself familiar with composer.

PHP-FIG

PHP being a “hack” was famous for quick dirty code. Everyone cursed PHP for being so naive language. PHP maintainers and developers came together to overcome the bad ugly code and standardized good code practices. PHP-FIG is the group responsible for recommending these standards of clean code. PHP Standard Recommendations, (PSR in shorts) are standards followed by developers to write clean better code. While you are not forced to follow these standards, laravel stricts to these standards and expects you to do the same. Read about PSRs a little will help you write better code.

After learning the above mentioned, you can start learning laravel easily. Head over to laravel documentation and start learning!

Also read: 17 programming tips to write better code

Featured image by Sotaro OMURA