لاراول

راهنمای کامپوننت های Blade

Blade Component Cookbook

As part of the Laravel 7 release, we gained access to supercharged Blade components. What's exciting about this is the fact that it can fundamentally change how you go about constructing the view layer of your applications. In this series, one component per episode, I'll show you a wide range of practical examples that you can freely use in your own projects.

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

پیش نیاز ها - توضیح کامپوننت های Blade

Before we begin reviewing some examples, let's first take a moment to review what Blade components are and why you might reach for them.

02
قسمت 2

Flash Component

Let's ease into things with this first episode. We'll build a simple, but flexible x-flash component.

03
قسمت 3

Form Component

Let's continue with another simple, but very useful component for constructing forms. Once complete, you'll no longer need to include the necessary @method and @csrf tags for every form.

04
قسمت 4

Form Button Component

Let's continue focusing on forms for one last episode. Often, you'll want to display a button or link to delete a resource. Let's see if we can simplify that workflow a bit.

05
قسمت 5

Modal Component

Let's do another one! This time, we'll create a wrapper around one of TailwindUI's modal components.

06
قسمت 6

Dropdown Component

In this episode, we'll create a reusable dropdown Blade component by combining Tailwind and Alpine.js.

07
قسمت 7

Nav Link Component

Let's do another one! This time, we'll create a component for a navigation link. In doing so, we'll remove duplication as well as hide the necessary logic to check if the link should be marked as "active."

08
قسمت 8

Mobile Nav Link Component

When styling applications with components, you'll very quickly run into responsive issues.

09
قسمت 9

Tabs Component

Basics tabs are laughably simple to create, but if we want an intuitive and reusable x-tabs component, let's see what we can do!

10
قسمت 10

Social Media Card Meta Component

In this episode, we'll create a basic Blade component for constructing the necessary meta attributes for Twitter and Facebook social media cards.

11
قسمت 11

Recaptcha Component

Next up, we'll create a useful Recaptcha Blade component that can be attached to any form. We'll begin by reviewing the basic setup instructions. Then, once we have a working example, we'll move on to extracting a Blade component that uses Alpine to initialize and render the widget.

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

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