Library

Snippet
Laravel
Clear orderBy in Laravel

If you've already applied ordering to an Eloquent query, you'll have to 'reset' it if you need to change the order later on. Here's how!

1 episode
4 mins
Course
Laravel
Livewire
Alpine.js
Build a Livewire Drag & Drop Uploader

Build a multiple file drag-and-drop uploader with Livewire and Alpine.js. Using Alpine and Livewire’s JavaScript API, we’ll directly hook into the JavaScript drop event and kick off the upload progress, validating files and showing a progress bar along the way. So, if you need drag-and-drop uploading in your Laravel project, this course has you covered!

9 episodes
43 mins
Course
Laravel
Livewire
Build a Livewire CSV Importer

Let's build a powerful CSV importer with Livewire, completely from scratch. This can handle millions of rows, be reused for multiple models, and by using job batches, doesn't require the browser to be open. This course is for you if: - You need a robust importer component for your models that you have full control over - You want to brush up on some advanced Livewire concepts - You want to learn about job batching and queues in Laravel

25 episodes
2 hrs 20 mins
Course
Laravel
Laravel Model Pruning

Database tables filling up? Let's learn how to quickly and automatically remove records with Laravel's native Pruning functionality. Before Laravel 8.50.0, we'd have to take care of this manually. Now, it's as simple as adding a trait, a query builder, and running an Artisan command. We'll also dive into what's happening behind the scenes to understand how this works.

6 episodes
23 mins
Course
Laravel
Custom Laravel Query Builders

Using Eloquent query scopes in your project? Consider swapping them out for custom query builders. Custom query builders are model-specific, class-based builders that provide better organisation, IDE autocompletion, and more. We'll start this course by defining some standard scopes, refactor them, and discuss the benefits of custom builders. This course is for you if: - You're using query scopes, but they're bloating your models - You're working in a team and need more organisation in your project - You haven't used query scopes and want a primer, plus an alternative

4 episodes
23 mins
Course
Laravel
Laravel Actions

Actions are single classes that do *one thing*. Laravel Actions is a package that allows you to run these classes as *anything* you want, whether it's a controller, listener, console command – or just on its own. Keeping your app structure to single classes like this lets you focus on what your app does rather than the design decisions around controllers, listeners and commands. Single actions are also easier to test, and we'll also cover that! This course is for you if: * You'd like to try a fresh approach to structuring your apps * Your app shares logic, and you'd like to combine this logic into one class that runs anywhere * You've heard of (or used) Laravel Actions, and you'd like a run-through

12 episodes
1 hr 2 mins
Course
Laravel
Easy Query Filters with Laravel Pipelines

Applying result filtering with query strings can mess up your controllers quickly. Let's reach for a solution using Pipelines, an undocumented but seriously powerful feature of Laravel. Every filter (e.g. only show activate users) will have its own class, neatly tucked away. We'll also cover testing, and see how this method makes isolated testing much easier.

6 episodes
35 mins
Course
Laravel
Build a Pay Once For Access App

Let's do payments right with the Stripe Payment Intent API, and build an app where customers can pay to access a members area. We'll cover setting up a Payment Intent, process payments correctly with authorization, handle declines, and securely respond to a Stripe webhook to upgrade a member. This course is for you if: - You want to process payments to upgrade customers for access - You need to learn how to properly process one-off payments with Stripe - You need a refresher on the Payment Intents API

15 episodes
1 hr 11 mins
Course
Laravel
Soketi Basics

Learn to broadcast events in realtime with Soketi, a simple, fast, and resilient open-source WebSockets server. In this course, we'll set up a Soketi server, configure Laravel for Soketi, and create events for public and private channels. Then, we'll listen for these events on the client and dump the payload from the server. If you need realtime events in your app, this course will get you up and running in no time.

5 episodes
26 mins
Course
PHP
PHP Enums

Enums represent a typed set of possible values in PHP. For example, if you're storing a Book that can have a status of __want to read__, __reading__ or __read__, an Enum will hold these values in one place that you can reference anywhere. Prior to PHP 8.1 (when Enums were added), you'd have to work with a simple class with constants. While that works fine, it doesn't provide much power under the hood. In this course, we'll look at the power of Enums and how they can drastically simplify your code.

7 episodes
31 mins
Course
Laravel
The Eloquent Query Method

Ever used the Eloquent query() method in Laravel before? In this short course, we'll dive into what this method does, and demonstrate the ways it can be used.

7 episodes
23 mins
Course
Laravel
Build a Friend System in Laravel

Everything you need to implement a friend system in Laravel, built in a simple UI so you can integrate it into your existing apps. We'll start with the basic friend relationships, then add in more advanced relations to make things future-proof. Want to easily get all friend's statuses on a timeline? No problem.

14 episodes
1 hr 16 mins
Course
Laravel
Up And Running with Pest

Pest is a PHP testing framework that brings beautifully simple syntax to your tests, without sacrificing on features. In this course, we'll get up and running with Pest in a Laravel project and write tests for a real-world application that we'll build along the way. You'll learn how to set Pest up in a Laravel project, write tests with Pest's built-in assertions, generate code coverage, and more.

35 episodes
4 hrs 19 mins
Course
Laravel
Livewire
Build an E-Commerce Platform

Build a robust e-commerce platform with a Laravel and Livewire. Features products with unlimited and flexible variations, a product browser with filters and price range slider, global product search, guest checkout, shipping and payment implementation, order status tracking and more.

78 episodes
8 hrs 42 mins
Course
Laravel
Laravel Cursor Pagination

Let's learn about cursor pagination in Laravel. With a simple method change, you'll end up with better performance with larger data-sets and much easier implementation of infinite scrolling. We'll build up a simple Vue app where we can post to a timeline, check out why standard pagination doesn't work and then switch to cursor pagination to fix it up!

6 episodes
25 mins
Course
Laravel
Laravel Aggregates

If you're displaying counts in your app, instead of pulling records into a Collection to count on, try aggregates! Working at the database level, aggregates are performed in one query and lower the memory usage of your app. Let's explore everything you need to know to work effectively with aggregate data in Laravel.

7 episodes
32 mins