ホーム > Laravel > What is Laravel? A Simple Explanation for Beginners
Laravel

What is Laravel? A Simple Explanation for Beginners

Thank you for your continued support.
This article contains advertisements that help fund our operations.

Here is a simple explanation of Laravel for beginners.

What is Laravel?

Laravel is an open-source PHP framework.

Laravel

History of Laravel

Laravel is a framework for the PHP programming language, first released in 2011.

Over the past 13 years, it has grown to become one of the most popular frameworks, even compared to other similar frameworks.

Comparison with Other PHP Frameworks

  • Laravel
  • Yii
  • CakePHP
  • Symfony
  • CodeIgniter

Worldwide

googletrend world

Google Trends "Worldwide, Laravel, Yii, CakePHP, Symfony, CodeIgniter"

Japan

googletrend japan

Google Trends "Japan, Laravel, Yii, CakePHP, Symfony, CodeIgniter"

Comparison with Frameworks of Other Languages

  • Laravel (PHP)
  • Express.js (Node.js)
  • Django (Python)
  • Ruby on Rails (Ruby)
  • Spring Framework (Java)

Worldwide

In 2013, Django saw a spike in searches, likely due to the release of the movie "Django Unchained."

googletrend world2

Japan

googletrend japan2

This shows how Laravel has become popular both globally and in Japan.

What is a Framework?

In short, a framework is a set of development tools that include common features and structures to streamline application development.

When creating pages or features, frameworks provide pre-implemented initial settings commonly used in most services.

Benefits

Increased Development Efficiency

Since frameworks come with pre-implemented common features, you don’t have to write basic code from scratch, speeding up development.

Code Reusability

Frameworks incorporate commonly used features and structures, allowing you to easily reuse them in your code.

Improved Maintainability

Frameworks generally provide standard structures, making it easier for teams to understand and modify code, leading to better long-term maintainability.

Built-in Security Features

Many frameworks include security measures (authentication, data validation, XSS, and SQL injection prevention), improving safety.

Scalability

Frameworks are designed to scale easily with project size, making them suitable for large-scale projects.

Community and Support

Popular frameworks have active communities, with plenty of documentation, support, and plugins available.

Ease of Testing

Many frameworks come with automated testing features, making it easier to ensure application quality.

Disadvantages

Learning Curve

Frameworks have unique structures and conventions, which can take time to learn. When introducing a new framework, the entire team may need to learn it.

Flexibility Constraints

Frameworks are designed to meet general development needs, so you have to follow their standard features and rules. This can make it difficult to meet specialized requirements.

Performance Overhead

Since frameworks come with many built-in features, their performance can be lower compared to lightweight custom implementations, especially in smaller projects.

Version Upgrades and Dependency Issues

Frequent updates to a framework can introduce compatibility issues. For long-term projects, it's essential to be mindful of framework and library updates.

Increased Dependency

Over-reliance on a framework can make it difficult to address issues or transition to other technologies if the framework becomes obsolete or unsupported.

Unnecessary Features

Comprehensive frameworks may include features that your project doesn't need, leading to bloated codebases.

Despite these disadvantages, I believe frameworks are essential for releasing applications efficiently.

What Can You Do with It?

You can essentially do anything with a framework.

While some processes are easier with certain frameworks or languages, and it's ideal to select the right tool for the job, there are very few things that Laravel cannot do when it comes to basic application development.

In rare cases where only Python can handle a specific process, it's possible to write that part in Python while using Laravel for the rest.

Examples of What You Can Do with Laravel

  • Building websites and web applications
  • User authentication and security features
  • Building APIs
  • Database management
  • Automated testing
  • Email sending
  • Scheduling and task execution
  • File storage and management
  • Real-time applications
  • Template engine (Blade)
  • Integration with third-party services (like Stripe or Paypal)

Development Process in Laravel

Like other frameworks, Laravel adopts MVC, which splits the process into three parts:

  1. Model
  2. View
  3. Controller

What is a Model?

The model handles data processing and management.

It includes logic for interacting with the database, saving, retrieving, updating, and deleting data.

Models manage the actual data used in the application, such as user information, product information, and blog post data.

What is a View?

The view handles the part that is displayed to the user.

In other words, it manages the user interface (UI).

Using HTML, CSS, and JavaScript, it defines how the data will be displayed on the screen.

For example, the visual elements like buttons, forms, and lists shown on web pages.

What is a Controller?

The controller handles user input and requests, processes them, and interacts with the model and view.

Controllers retrieve data from the model and pass it to the view for display.

They also handle user actions (like button clicks or form submissions) and execute the necessary logic.

For example, a controller can handle login form data, verify if the user is valid, and display the result.

Flow

  1. The user sends a request (e.g., accesses a page URL, submits a form).
  2. The controller receives the request and, if necessary, asks the model to process the data.
  3. The model manipulates the data and returns the result (e.g., fetching information from a database).
  4. The controller receives the result and passes it to the view for display.

Benefits of MVC

  • Easier to divide tasks: Since models, views, and controllers are separate, developers with different roles can work on the same project simultaneously.
  • Improved maintainability: When changing features or appearance, the independent components limit the scope of changes.
  • Reusability: Since business logic (model) and presentation (view) are separated, the logic can be easily reused elsewhere.

These benefits make MVC a widely praised approach. However, I believe the greatest benefit is how it provides a clear structure, making it easier to adapt to new projects, even when switching jobs.

Laravel Focuses on the Backend

Laravel is mainly a backend framework.

While it has some frontend capabilities, it's easier to combine it with other frontend frameworks.

For example, React's Next.js or Vue.js's Nuxt.js are easy-to-choose frontend frameworks, and many people are already familiar with them.

Recommended Frontend for Laravel Beginners

With so many choices, Laravel beginners may be unsure of which to pick.

I think it's best to base the decision on your future goals.

If You've Decided to Become a Backend Engineer

In this case, it's better to focus on learning Laravel's Blade templates.

Laravel 11.x Blade Templates

The reason is that learning other frameworks takes time.

Writing frontend code with Blade is very similar to HTML + CSS, so once you get used to retrieving data and specifying dynamic links, you can write most frontend code using HTML + CSS.

If You've Decided to Become a Full-Stack Engineer

In this case, using a frontend framework is a better option.

However, frameworks like Next.js can be challenging to learn, so it's easier to start with ones that allow you to write React or Vue only in parts.

I believe the best full-stack learning path for beginners is to use Laravel's Breeze starter kit with Inertia frontend using React.

Laravel 11.x Starter Kits

If You Want to Work for a Company Using a Frontend Framework

Start learning that framework along with Laravel right away.

It's Important to Explore Interesting Technologies

Even experimenting briefly with new technologies will give you a significant advantage over knowing nothing at all.

If you’re thinking about splitting Nuxt.js and Laravel into different projects, just give it a try. The experience will be valuable.

On Technology Selection for Career Change

In the end, each company has its own policies, and it’s not uncommon to be cut off after creating a portfolio because a company says, "We were looking for someone who uses Vue."

There are many companies out there, so you just have to accept that this can happen.

The important thing is whether you can select technologies by working backward from your long-term vision.

For example, if you say in an interview, "I want to become a full-stack engineer in the future," the interviewer might ask, "Then why didn’t you challenge yourself with a front-end framework in your portfolio?"

If your answer is something like "Because someone told me to..." you will likely be rejected.

It is crucial to firmly decide your future vision on your own and create your portfolio by working backward from that vision.

How to Learn Frameworks

Frameworks Are Tools That Anyone Can Use by Memorizing the Manual

The good thing about frameworks is that anyone can use them by learning how to do so.

It’s true that experienced programmers understand them faster than beginners, but beginners can also become proficient by taking the time to learn.

Spend Time and Persevere

Once you learn a framework, it becomes a skill that you can use for a long time, like riding a bicycle.

While it’s easy to feel a sense of emptiness when a simple error takes hours to fix, I believe this is something everyone experiences, and only those who invest time can solve it.

Learning Methods

As mentioned earlier, the learning method I recommend is based on the premise of "taking time to learn how to do it."

Ultimately, the skills you gain will be better than those from products that claim to be "easy to learn," and there won’t be much difference from what I’ll introduce next.

Recommended Method: Learning through Videos

I recommend this educational material.

It’s quite expensive at full price, so I buy it during sales.

udemy laravel

Udemy: Learn the Basics of Web Application Development with Laravel 10 and MySQL

It’s important not just to watch the videos but to run the code on your PC while you watch.

The good thing about this material is that

Total time: 9 hours 58 minutes

and it covers everything necessary to learn in a short time.

I also recommend videos because you can see the actual screen operations.

Once you get used to it, text can lead you to necessary information faster, but initially, videos provide more information, which is beneficial.

Learning through Books

Originally, I recommended this book, but it has become somewhat outdated and harder to recommend.

Hands-On Learning! Introduction to Laravel Development

Books are more prone to typographical errors compared to videos, and in programming, even a single character difference can result in errors, so I think they’re not very suitable for hands-on learning.

In videos, you can refer to the actual code that works right in front of you.

Is It Necessary to Learn Basic PHP Syntax First?

I don’t think it’s necessary.

I believe it’s good to learn PHP syntax while also learning Laravel.

In the end, if you try to memorize the syntax first without knowing where to use it, it might not click for you, and just memorizing the syntax won’t necessarily make learning Laravel easier.

  1. Write some working code in a hands-on manner, and then move on to the next topic.
  2. Don’t go back to what you’ve already done; just try to finish it all.

Try to progress with this approach.

What Learning Methods Come Next?

The best approach is to create what you want to make.

It’s important to challenge yourself to create your own application.

Conclusion

In summary, I have outlined Laravel for beginners.

Laravel is very easy to use and in demand, so acquiring it as a skill is definitely worthwhile.

Thank you for reading to the end.

Please Provide Feedback
We would appreciate your feedback on this article. Feel free to leave a comment on any relevant YouTube video or reach out through the contact form. Thank you!