لاراول

Jeffrey's Larabits

Jeffrey's Larabits

Here, you'll find Jeffrey Way's personal collection of Larabits. If you're unfamiliar, Larabits are short, isolated lessons that focus on a single concept or technique. While a typical series may take hours to work your way through, Larabits are instead for when you have five or ten minutes to pick up a small bit of knowledge.

Please keep in mind that each of these lessons is self-contained and may be viewed in any order. Happy learning!

سطح متوسط 7 جلسه آموزشی 00:27:00 ساعت
01
قسمت 1

How Jeffrey Would Setup PHPStorm

I'm asked about which code editor theme I use frequently enough to the point of being comical. It's called Nord, by the way. But if you'd like to know more, why don't you come along as I outline everything that I would personally do in the first ten minutes after installing PHPStorm for the first time. We'll cover the general layout of the editor, installing themes, adjusting preferences, and pulling in a handful of key plugins that I use every day.

02
قسمت 2

Exciting New PHP 8.1 Features

PHP 8.1 is scheduled to be released near the end of 2021, and it's shaping up to be another fantastic release. You can look forward to a variety of useful features ranging from constructor initializers, to read-only class properties, to enum support.

03
قسمت 3

New in Laravel: Disable Lazy Loading

One side-effect to Eloquent's ability to lazy load relationships on the fly is the fact that it occurs behind the scenes. It's not always easy to spot. If you're not thoughtful and careful, this can often lead to the undesirable N+1 problem. Or, in other words, if you fetch one hundred records from the database, you end up with one hundred SQL queries.

04
قسمت 4

So Much Power in a Single Line

Laravel's authorization gates are wildly powerful and flexible thanks to their integration with the rest of the framework. Once you write a single line of code to define a new gate, you can then "perform" this authorization within your controllers, or as a middleware, or even as a Blade or PHP conditional in your views.

05
قسمت 5

Refactor to Match Expressions

In this Larabit, I'll show you how to refactor a series of confusing PHP conditionals into a simple lookup table. To accomplish this, we'll leverage PHP 8's match expression and its ability to handle non identity checks.

06
قسمت 6

Consider Interaction Traits for Tests

In this Larabit, I'll give you some basic tips and advice for extracting "interaction" traits for your tests. This is a very simple pattern, but one that provides a lot of bang for your buck. In fact, you'll find it in the Laravel codebase all over the place.

07
قسمت 7

Introduce Seams for Better Refactoring

In this video, you'll learn how to introduce seams. This is one of my favorite refactoring techniques - particularly when cleaning up large, messy methods. It's a simple enough process that involves adding a conditional to the top of the method you're refactoring. This then gives you a "hook" for introducing and rewriting portions of the code, while still having the option to fall back to the original logic and implementation.

دوره در حال اجرا

این دوره هنوز به پایان نرسیده است و در آینده درس های دیگری به آن افزوده خواهد شد.