Code review at scale is broken. Here’s how Augment Code is fixing it.

21 Laravel Tutorials for Learning Laravel in 2021

Published on by

21 Laravel Tutorials for Learning Laravel in 2021 image

2021 is a great time to learn Laravel and improve your knowledge if you’ve been using it. To start the year off we’ve made a list of 21 tutorials on everything from getting started to going deeper with the framework.

Getting Started with Laravel Tutorials

Laravel from Scratch

In this step by step Laracasts series, you’ll learn how to build web applications with Laravel. You’ll start with the basics and incrementally dig deeper and deeper, as you review real-life examples. Once complete, you should have all the tools you need.

Step by Step Guide to Building Your First Laravel Application

In this tutorial, you’ll go through building a simple link directory app. It covers everything from planning, setting up your database, Blade views, and more. Join our weekly Laravel newsletter and get this as a free PDF.

Laravel Release Process

As you begin to work with Laravel one thing you should note is how the release process works and when new versions are scheduled to come out.

Building a Vue SPA with Laravel

This is a multiple part series taking you through building a Vue SPA with Laravel. part 1, part 2, part 3, part 4, part 5, and part 6.

Laravel Eloquent

Laravel Eloquent is an object-relational mapper (ORM) that makes it easy to interact with your database. When using Eloquent, each database table has a corresponding “Model” that is used to interact with that table. In addition to retrieving records from the database table, Eloquent models allow you to insert, update, and delete records from the table as well.

Learn to master Eager Loading

At its core Eager Loading, is telling Eloquent that you want to grab a model with specific relationships that way the framework produces a more performant query to grab all the data you will need. By eager loading, you can take many queries down to just one or two.

In this tutorial, you’ll set up some example relationships and then walk through how queries change with and without eager loading.

6 Laravel Eloquent Secrets to improve your code

In this tutorial, we’ll show you more or less hidden secrets, methods, and properties you might not know to improve your code.

20 Laravel Eloquent Tips and Tricks

Eloquent ORM seems like a simple mechanism, but under the hood, there’s a lot of semi-hidden functions and less-known ways to achieve more with it. In this tutorial, you’ll see and discover a few tricks you might not know about.

Laravel firstOrNew, firstOrCreate, firstOr, and updateOrCreate methods

If you’ve been working with Laravel for any time, you probably know the standard methods for creating Eloquent Models like make(), create(), update, and save(). Laravel includes some other methods are that also really useful for creating and updating Models that I feel don’t get enough attention. In this tutorial, you’ll learn about some of these additional methods and see how they might be useful.

Laravel Validation

Laravel Validation 101

A core part of any project is understanding how to validate the incoming request from your users and in this tutorial let’s look at how we can setup validation with our controllers, form requests, and rules.

Testing Length Validation in Laravel

Learn how to work with and test string length validation.

Add a Check For Pwned Passwords In Your Laravel Form Validation

Have I been pwned? is a service created by Troy Hunt that aims to archive all data breaches and then allow you to check and see if your email or username has been included in any breaches. It’s a super helpful service to see if your email or password has been found in a breach and in this tutorial learn how to utilize this data in your Laravel Validation

Laravel Helpers

Creating your own Laravel Helpers

Laravel provides many excellent helper functions that are convenient for doing things like working with arrays, file paths, strings, and routes, among other things like the beloved dd() function. You can also define your own set of helper functions for your Laravel applications and PHP packages, by using Composer to import them automatically.

5 Laravel Helpers to Make Your Life Easier

There are a ton of helper methods in Laravel that make development more efficient. If you work with the framework, I encourage you to see what helpers you can introduce in your day-to-day work. In this post, I’d like to point out a few of my favorites.

Going Deeper

Laravel Jobs and Queue 101

In this tutorial, learn all about Laravel Jobs and Queues by building a simple analytics app.

Using Laravel Sanctum to authenticate a React SPA

Sanctum is Laravel’s lightweight API authentication package. In this tutorial, we’ll be looking at using Sanctum to authenticate a React-based single-page app (SPA) with a Laravel backend.

Laravel Model Events

Laravel Model events allow you to tap into various points in a model’s lifecycle, and can even prevent a save or delete from happening. The Laravel model events documentation outlines how you can hook into these events with event classes, and this article aims to build upon and fill in a few additional details on setting up events and listeners.

Tips to speed up PhpUnit

Having a fast test suite can be just as important as having a fast application. As a developer, getting feedback quickly about the state of your code allows for a much quicker development turnaround. Here we are going to run through some tips you can implement today to make your tests run faster.

Seeding Data for Testing

In this tutorial, you will create a test case to test the user model and a seeder to seed ten users, and each is following one user into the database.

Improve Your Routing with these tips

In this tutorial, get a quick jumpstart on learning how to use routing in your Laravel applications.

Laravel Model Factories Tutorial

Laravel comes with a feature called model factories that are designed to allow you to quickly build out “fake” models. These have several use cases with the two biggest being testing and database seeding. Take a deeper look at this feature in this tutorial

Increase Your Terminal Productivity

Many great developers could improve and gain some productivity and better tooling in their Terminal, so take a look at this tutorial for improving your productivity.

Wrap up

2020 was quite a strange year for everyone but even during the pandemic Laravel continued releasing new versions, making improvements, and getting better. In 2021, look for the release of Laravel 9 and 10, as well as more conferences, and hopefully more in-person meetups as things go back to normal.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Battle Ready Laravel

The ultimate guide to auditing, testing, fixing and improving your Laravel applications so you can build better apps faster and with more confidence.

Visit Battle Ready Laravel
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $3200/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Cut PHP Code Review Time & Bugs into Half with CodeRabbit logo

Cut PHP Code Review Time & Bugs into Half with CodeRabbit

CodeRabbit is an AI-powered code review tool that specializes in PHP and Laravel, running PHPStan and offering automated PR analysis, security checks, and custom review features while remaining free for open-source projects.

Cut PHP Code Review Time & Bugs into Half with CodeRabbit
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit

The latest

View all →
Laravel 12.44 Adds HTTP Client afterResponse() Callbacks image

Laravel 12.44 Adds HTTP Client afterResponse() Callbacks

Read article
Handle Nested Data Structures in PHP with the Data Block Package image

Handle Nested Data Structures in PHP with the Data Block Package

Read article
Detect and Clean Up Unchanged Vendor Files with Laravel Vendor Cleanup image

Detect and Clean Up Unchanged Vendor Files with Laravel Vendor Cleanup

Read article
Seamless PropelAuth Integration in Laravel with Earhart image

Seamless PropelAuth Integration in Laravel with Earhart

Read article
Laravel API Route image

Laravel API Route

Read article
Laravel News 2025 Recap image

Laravel News 2025 Recap

Read article