Our top 10 Laravel Tutorials of 2021

Published on by

Our top 10 Laravel Tutorials of 2021 image

As 2021 comes to a close let's take a look back at the ten most popular Laravel tutorials we published this year.

  1. Laravel firstOrNew, firstOrCreate, firstOr, and updateOrCreate methods - Laravel Eloquent has a few useful features like firstOrNew, firstOrCreate, firstOr, and updateOrCreate and in this tutorial let's look at how they might be useful.
  2. Mistakes I've Made in AWS Here's a collection of the most commonly missed things when using AWS with Laravel Forge.
  3. Understanding the sole() Query Builder Method Laravel 8.23.0 introduced a sole() method to the query builder, which retrieves a single record but also has additional assertions.
  4. Duplicate or Clone a database record with Laravel Have you ever needed to duplicate a database record? Laravel provides a very handy function for this called replicate which will take an Eloquent model and make a copy so you can then make changes and save it.
  5. The Ultimate Performance Checklist For Laravel Apps Laravel is fast out-of-the-box, but you can make it faster if you optimize your configurations and application code. This guide lists a wide range of performance tips from quick wins to advanced techniques that would help you make your Laravel app the lean, mean machine your customers want.
  6. Find N+1 problems instantly by disabling lazy loading Preventing lazy loading in development can help you catch N+1 bugs earlier on in the development process. The Laravel ecosystem has various tools to identify N+1 queries. However, this approach brings the issue front-and-center by throwing an exception.
  7. CLI to Check For PHP Security Vulnerabilities Enlightn Security Checker is a command-line tool that checks if your application uses dependencies with known security vulnerabilities.
  8. 5 Tips for the Laravel Service Container Mohamed Said published a new video on the Laravel Youtube channel outlining 5 tips for dealing with Laravel's Service Container
  9. "One of Many" Eloquent Relationship Added to Laravel The one-of-many relationship creates a one-to-one association from a one-to-many relationship.
  10. Creating Your Own PHP Helpers in a Laravel Project 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.

Thanks to Fathom analytics for making this list easy to put together, and we hope you have had a great 2021 and we look forward to seeing you again next year!

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
Oh Dear

Oh Dear is the best all-in-one monitoring tool for all your Laravel apps.

Visit Oh Dear

The latest

View all →
Announcing Laravel Pulse - A New Performance Monitoring Tool for Laravel Apps image

Announcing Laravel Pulse - A New Performance Monitoring Tool for Laravel Apps

Read article
Use Ollama LLM Models Locally with Laravel image

Use Ollama LLM Models Locally with Laravel

Read article
TallStackUI - a new component library for TALL Stack apps image

TallStackUI - a new component library for TALL Stack apps

Read article
Laravel 10.34 Released image

Laravel 10.34 Released

Read article
Laravel Tailwind Merge image

Laravel Tailwind Merge

Read article
Generate Validation Rules from a Database Schema in Laravel image

Generate Validation Rules from a Database Schema in Laravel

Read article
Honeybadger logo

Honeybadger

Zero-instrumentation, 360 degree coverage of errors, outages and service degradation.

Honeybadger
Laravel Forge logo

Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Forge
Oh Dear logo

Oh Dear

Oh Dear is the best all-in-one monitoring tool for all your Laravel apps.

Oh Dear
Tinkerwell logo

Tinkerwell

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

Tinkerwell
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
Bacancy logo

Bacancy

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

Bacancy
LoadForge logo

LoadForge

Easy, affordable load testing and stress tests for websites, APIs and databases.

LoadForge
Paragraph logo

Paragraph

Manage your Laravel app as if it was a CMS – edit any text on any page or in any email without touching Blade or language files.

Paragraph
Lucky Media logo

Lucky Media

Bespoke software solutions built for your business. Partner with Lucky Media, your favorite Laravel Development Agency!

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