Articles

Or more accurately, word dumps.

Unconventional Laravel: Route groups and `$router`

When registering grouped routes using `Route::group()`, it's normal to register those nested routes using the `Route` facade, but have you ever used the `$router` variable?

Published 4 weeks ago | Updated 2 weeks ago

Add Classes to Active Link in Laravel

Adding a class to make the current page "active" in your application's navigation is a simple UI improvement. Let me show you how I typically do this in my apps.

Published 1 month ago | Updated 1 month ago

Manually Refreshing a Livewire Component

Livewire provides a clean API for automatically polling and refreshing a component, but what if you want to manually refresh a component?

Published 2 months ago | Updated 2 months ago

Clearer Time Values with Carbon

How often do you see something like `2 * 24 * 60 * 60` and wonder what that value actually represents and what those magical numbers mean? Don't worry, Carbon's constants are here to help you out.

Published 2 months ago | Updated 2 months ago

Simple Repositories in Laravel

Abstracting common queries in your Laravel applications can be done in many ways. Let's take a look at the simplest way using the "Repository pattern".

Published 2 months ago | Updated 2 months ago