Lifetime access is $100 off. Ends this week.Join here →

Articles

Showing 10 posts
May 24th, 2024

How to Assert Element Count With Laravel Dusk

While Dusk doesn't provide a direct assertion method to check the count of elements on a page, we can still fetch all elements by a selector and then make an assertion on what's returned.

Author
Alex Garrett-Smith
Testing
Laravel
May 24th, 2024

The Complete Guide to Authenticating with Laravel Sanctum in Vue

This article will cover all the steps you'll need to authenticate from your Vue apps using Laravel Sanctum, up to the point you're able to authenticate and hold some state about the user.

Author
Alex Garrett-Smith
Laravel
Vue
May 22nd, 2024

Laravel Has Many Through Pivot Relationships

Laravel doesn't support has many through pivot relationships out the box, but we can still achieve this manually with a pivot model.

Author
Alex Garrett-Smith
Eloquent
Laravel
May 22nd, 2024

Pagination with Inertia and Vue

In this article, you'll learn how to add pagination to your Inertia apps with a simple, custom, re-usable pagination component.

Author
Alex Garrett-Smith
Vue
Inertia
Laravel
May 21st, 2024

How to Use Casts Inside a Laravel Trait

If you move over some functionality to a trait in Laravel that requires casts to be added as part of the trait's functionality, this won't merge by default.

Author
Alex Garrett-Smith
Laravel
Eloquent
May 19th, 2024

Eloquent Events on Pivot Tables

I recently needed to listen to events on a pivot table within the Codecourse codebase. When a user resets progress for a course, and all the episodes they've completed are detached, episode progress (stored in Redis) should be removed.

Author
Alex Garrett-Smith
Laravel
Eloquent
May 18th, 2024

Using the Booted Method Inside Traits in Laravel

Extracting some functionality to a trait but need to use the static booted method within that trait? Here's how.

Author
Alex Garrett-Smith
Eloquent
Laravel
May 17th, 2024

Disable Global Scopes in Laravel Nova

If you're using global scopes in Laravel, these will likely affect your admin panel. Here's how to remove them.

Author
Alex Garrett-Smith
Laravel
May 7th, 2024

Your Guide to Every Official Laravel Package and Service

The Laravel Ecosystem is big. So big that when you start working with it, it's sometimes difficult to know which first-party packages are available, and which ones to reach for.

Author
Alex Garrett-Smith
Laravel
April 30th, 2024

What Codecourse Uses

So what goes into running a profitable educational screencast company for developers? Here's everything I use.

Author
Alex Garrett-Smith
Business

Tags