Livewire Basics
Livewire has quickly become one of the most popular package for building Laravel applications. It allows you to create dynamic components within PHP, which often results in allowing you to skip the JavaScript layer entirely.
In this series, we’ll go over the basics of Livewire and why/when you might reach for it. We’ll then build and test several practical Livewire components.
Updated Series Available
You are viewing an archived course. We instead recommend that you watch Livewire 3 From Scratch.
Progress
Series Info
- Episodes
- 14
- Run Time
- 3h 2m
- Difficulty
- Intermediate
- Last Updated
- Sep 28, 2020
- Version
- Livewire 2
Series Episodes
- Introduction (1)
- Examples (13)
Contact Form With Validation
Let's convert a vanilla contact form to use Livewire. This will give us the opportunity to also review real-time validation. This component should give you a solid understanding of the basics of Livewire, including binding data withwire:model, calling methods on the server, and re-rendering views.Contact Form Testing
Testing Livewire components is a breeze. Let's have a look at testing our contact form and all of its features.Search Dropdown
Next up, let's use the iTunes API to build a search dropdown that allows us to search for songs and artists. As part of this example, we'll also review how to test it.Pagination
Pagination in Livewire is quite similar to pagination within a vanilla Laravel. Let's review everything you need to know in this episode.Datatables
Let's build a datatables component that allows a person to search, filter, sort and manipulate the query string. This component will demonstrate the power of Livewire, as building a datatables component the traditional way would require a significant amount of JavaScript.Datatable Testing
Continuing from the previous episode, let's now write a series of tests for our datatable component.Comments Component
In this lesson, we'll convert the comments functionality from vanilla Laravel to a Livewire component. Components like these are great use-cases for Livewire components, where we don’t want to trigger a full page-refresh after submitting a form.Comments Component Testing
Let's continue with the comments component we wrote in the previous episode, and learn how to test it.Livewire Polling
Let's have a look at an example that uses polling in Livewire. Polling can prove useful when your components should continuously refresh to display the latest data.File Uploads
Moving on, let's explore file uploading in Livewire. Livewire makes use of temporary uploads which allows us to perform real-time validation and image previews. Let's take a look at these with an example using posts with a cover image.File Uploads Testing
Now, let's learn how to test the file upload component that we wrote in the previous episode.Events With Tags Example
Let's review Livewire's event system by playing with a third-party tagging library. Livewire allows you to fire and listen for events in the front-end or the back-end, which makes component communication a cinch.Tags Component Testing
Once again, let's test our tags component, as well as the Livewire events.
