How I learned Laravel 5.x
About me
I am a passionate web developer who enjoys building robust back-end APIs and web applications using PHP and its popular framework Laravel. I am also a web development tutor and mentor. I'm constantly learning new things to expand my skill base and keep pace with fast-moving technological trends so that I am always providing relevant courses to my mentees.
Why I wanted to learn Laravel 5.x
In my early days of programming, I remember taking, literally, months working on web projects in raw PHP and MySQL that seemed to make no progress despite my unrelenting efforts and growing lines of code.
Another thing that gave me much anxiety was that despite the hard work, I still found myself constantly doubting and worrying about code reusability, scalability, performance, and security in my application. One day, after being introduced to Laravel by a friend, I fell in love with it at once because I could see within a couple of hours how many goodies Laravel brings out-of-the-box.
I saw that I no longer needed to code everything all by myself from scratch. I set out to learn Laravel and grew to enjoy it even more as I understood more about it.
How I approached learning Laravel 5.x
First of all, I realized that Laravel was a framework built on Object-Oriented Programming principles. So I read up about Object Oriented Programming and did a few test projects in raw PHP (no framework) where I created different classes for different objects, such as: users, posts, comments, database classes, etc to practicalize my understanding of Object Oriented concepts.
Secondly, exploring the Laravel application directory structure, I understood the MVC (Model View Controller) design patterns and how application logic (controllers), data(Models), and the interface (Views) are kept distinct but made to communicate with each other to produce an application that is built with scalable and easy-to-understand code.
Next, I then took a few courses on Udemy on the Fundamentals of Laravel. This didn't take much time to learn, since I'd already been working with raw PHP. After the Fundamentals, I took a deep dive into more advanced concepts, such as: creating RESTApis, Middlewares, using packages, third-party integrations, tests, email sending, and more.
With this experience and a few projects I'd worked on over the course of a year, I applied for my first job and got hired as a Junior Laravel Developer. Since then, I have worked with teams of veteran developers for a long time on large scale production projects. This has greatly deepened my understanding of Laravel.
Challenges I faced
Laravel might have been an easy framework to learn, but I faced quite some challenges learning it. For instance, it took me quite some time to understand the Eloquent ORM and to use it to query related data from the database.
Before learning Laravel, I'd not yet familiarized myself with working with routes. It took some time and confusion of the order in which routes are placed and executed before finally understanding them.
Key takeaways
I learned that I didn't need to go on reinventing the wheel. Unless I had concrete reasons to do otherwise, usually it is better to use a framework that has been built and tested by a community and that already does most of the work out-of-the-box for you.
Nevertheless, my understanding of raw PHP gave me a solid grasp of fundamentals that helped me learn Laravel in a relatively shorter amount of time. Understanding the fundamentals is always very important for just about any learning process because everything else builds up on the fundamentals.
Tips and advice
Having used Laravel to work on an application with a user base of about 30,000 users, I can say with confidence that Laravel is a good and simple way to learn technology. Laravel also has a very active community — you can easily get help and quality course online to study it.
Also, one should never be in so much of a rush to learn a programming language that one overlooks the fundamentals. Everything is built on fundamentals. If you don't have a solid understanding of the fundamentals, you are more likely to get stuck on the slightly more difficult concepts since they rest on fundamentals.
Final thoughts and next steps
I would say that my learning curve for Laravel was pretty steep. This is because, first, I had already taught myself PHP and had a solid understanding of PHP. Secondly, I had purchased quality courses from trusted instructors who organized the courses and made sure they listed to me all of the requisite skills, such as Object Oriented PHP, MVC design principles, before I even began coding in Laravel.
Right now, JavaScript seems to be taking over front=end development, I look forward to honing my skills on some of its popular frameworks, such as: ReactJS, AngularJS, etc. so that I can be a more complete web developer.