Home  >  Article  >  PHP Framework  >  These 7 suggestions will help you learn Laravel with twice the result with half the effort!

These 7 suggestions will help you learn Laravel with twice the result with half the effort!

藏色散人
藏色散人forward
2021-11-11 13:59:582267browse

The following Laravel tutorial column will recommend seven suggestions for learning Laravel more efficiently. I hope it will be helpful to everyone!

Seven tips to learn Laravel more efficiently

With the development of the community, many ready-made resources have emerged to help you learn Laravel. Looks great, doesn't it? But how do you choose the best one? In other words, which one is more suitable for you and helps you learn more efficiently? Facing the ever-improving framework of Laravel, I believe you have also raised these questions. Here are seven tips that will hopefully help you learn Laravel more effectively.

Some of these tips apply only to learning Laravel, while others apply to learning any programming language or framework.

1. To be honest, don’t start learning from the official documentation

#The first thing novices usually do is to read Laravel’s official documentation. Don’t get me wrong if you’re a headliner, Laravel’s documentation is pretty awesome! However, most of the time the person writing the documentation expects the reader to have some knowledge of the PHP ecosystem and modern tools.

For example, the first part of the document is installation, but it is not just "download and install". You have to know how to use Composer, how to use the terminal or command line, how to run commands, how to make a web server work, etc.

2. Learn PHP, OO, Terminal and Composer first

#Learning these sounds interesting, but I see more and more people who want to learn Laravel No one starts by learning PHP. Just like people who want to use jQuery without learning any JavaScript. The existence of the framework is not to give you a shortcut to learning, but to be down-to-earth and start from the basics.

To start learning any modern PHP framework (Laravel, Symfony, or others), you need to be comfortable using PHP. Especially object-oriented programming. All frameworks are written in object-oriented mode, and you need to be fluent in using classes, objects, properties, methods, dependencies, traits and other "keywords".

Generally speaking, I recommend that you create at least a simple project built using pure PHP rather than using any framework. This will allow you to better understand PHP and make more effective use of Laravel's internal functions.

In addition, in my opinion, it is the Composer tool that makes PHP more powerful. Understanding Composer will teach you how to take full advantage of Laravel's dependencies, which is an important part of modern PHP development.

There are also terminals, namely Terminal for OS systems and cmd for Windows systems. Likewise, modern PHP frameworks use commands to perform most functions such as generating code, installing libraries, changing settings, deploying runs, etc. You must know these basics.

Everything above is what you need to know before starting Laravel. Did you suddenly get scared when you saw this? Don't be afraid! This is just the beginning of suggestions.

3. Books, courses or videos? Free or paid?

#Many people ask the first question when learning something: Is there any best way to get started? Everyone's choice is different. Some people like to learn by reading books, while others prefer intuitive and easy-to-understand video courses. Either way is fine. But the premise is that the content you are looking for should be relatively stable and well-structured. Instead of finding some random articles or videos from YouTube, it won’t give you the results you want. You need the author to explain these things consistently. Otherwise, you may get confused easily and fail to understand the deeper lessons.

This is also the fundamental difference between free courses and paid courses. Some people say that all you need to do to learn programming is to look up more information on the Internet, because there is a lot of free information on it. This is true, but if you choose to study this way, you will spend a lot of unnecessary time putting it all together. Paid courses or books are usually the best because the content is specially prepared to facilitate your learning, so you don’t need to spend time looking for it. (If you can stand on the shoulders of giants, why not?)

Here are three resources I recommend:

Laravel Up & Running – a book written by Matt Stauffer

Laravel from Scratch - Laracasts series of videos

Get Started With Laravel 5 - Tutsplus courses

The above are all foreign learning resources. Can’t you speak English? Don't be afraid, you can still understand it if you bite the bullet. Of course, there are also domestic resources:

Laravel introductory tutorial - Chinese tutorial written by Laravel China community Summer & Li Jinfa (Aufree)

And the book on how to learn PHP better, @overtrue An Zhengchao Master will always recommend the book "In-depth PHP: Object Oriented, Patterns and Practice".

(Of course there are more and better books, and I hope more interested people can recommend one or two)

4. Stop reading and write bugs to

#It is impossible to learn any programming without typing code or writing bugs. Don’t spend too much time reading books or watching videos, start coding as early as possible. In fact, you should start practicing coding immediately after completing each lesson or reading each chapter.

Generally speaking, I recommend that you create a test project during the learning process, it makes the process not only more realistic, but also more motivating. It is emotionally difficult to continue learning theory without having appropriate goals and some purpose.

If you only write code, you will hit obstacles and have many questions to ask. By encountering problems and overcoming them, you expand your knowledge and become a true developer. (Just have to be more patient and use up your fighting spirit to upgrade and clear dungeons!)

5. Learn to use Google and StackOverflow

#Although Not directly related to Laravel, but it's important. Don’t you know how to use Baidu? Go Google it! For programmers, finding a ladder is not difficult. Do you know the difference between Google and Baidu? I do not know? Then go to Google!

StackOverflow is a program-related IT technology question and answer website. Generally, when you search for solutions to problems on Google, usually the first content that is searched comes from StackOverflow.

Then the question comes! Can you ask questions? Haha, you may question "what does it mean to be able to ask questions?" I recommend that you first read the Chinese version of "The Wisdom of Asking Questions".

Generally, each forum and community has its own culture, rules and behavioral expectations, such as the community posting and management specifications of the Laravel China community. And when you are in the technical community, you can not only read technical posts posted by others, but you can also ask questions in the right way and style. If you are polite, patient and respectful, you will have a better chance of getting help from an expert.

6. Find a mentor

#The biggest problem with learning to program is that you don’t know how to troubleshoot when something doesn’t work. The best solution to this problem is to ask others for help. On the importance of finding a great person to help you!

Where should you find a mentor? In your social circle, both offline and online. Seniors at school or experts on community forums, believe me, as long as they are not busy and the question you ask is not too stupid, they will be happy to help you. Of course you have to find the channels yourself, ask questions in the community, or send them private messages.

7. Don’t give up

#As mentioned in the previous tip, it’s easy to give up when you encounter a problem you can’t solve. Maybe that's why so many people start learning, but only a few actually become professional developers. There won't always be rainbows and butterflies, and the road will always be full of problems. Difficult questions, self-doubt, and even the temptation to throw your computer out the window. Yet every developer goes through this without interruption. Trust me, no matter what happens, what you have to do is keep going, keep going, and keep going. When you start to be creative, when you can easily realize what you have in mind, you will know that it is all worth it.

Finally, speaking of continuous improvement, my final piece of advice is not to let too long a gap between study sessions and breaks. Keep learning something new every week or even every day. It's like a workout and if you miss a day, it's hard to get back into rhythm. (Only insisting on learning and insisting on continuous learning is the kingly way)

The above are my suggestions. I hope you will find your best learning method. Maybe one day, we will create an amazing world. Laravel project while working together!

The above is the detailed content of These 7 suggestions will help you learn Laravel with twice the result with half the effort!. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:juejin.im. If there is any infringement, please contact admin@php.cn delete