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
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.
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.
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.
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.
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.
In this tutorial, we’ll show you more or less hidden secrets, methods, and properties you might not know to improve your code.
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.
If you’ve been working with Laravel for any time, you probably know the standard methods for creating Eloquent Models like
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.
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.
Learn how to work with and test string length 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 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.
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.
In this tutorial, learn all about Laravel Jobs and Queues by building a simple analytics app.
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 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.
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.
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.
In this tutorial, get a quick jumpstart on learning how to use routing in your Laravel applications.
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
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.
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.