Articles

Showing 10 posts
December 5th, 2024

Everything You Need to Know About Laravel's Conditionable Trait

Laravel's conditionable trait can help make code more fluent by allowing you to conditionally invoke methods within a callback. This article gives you everything you need to know to start using it.

Author
Alex Garrett-Smith
Laravel
December 4th, 2024

How to Output Ordinal Numbers with Laravel

Thanks to the relatively new Number helper, ordinal numbers (like 1st, 2nd, 3rd, etc.) are now easy to output in Laravel. Let's take a look!

Author
Alex Garrett-Smith
Laravel
November 18th, 2024

Deferred props in Inertia

The new deferred props feature of Inertia v2 eliminates the need to write our own boilerplate code to delay loading data. Let's see how it works.

Author
Alex Garrett-Smith
Inertia
JavaScript
November 14th, 2024

Polling in Inertia

The usePoll helper has landed in Inertia, making it really easy to refresh prop data at a given interval. Here's how it works, and some tips.

Author
Alex Garrett-Smith
Inertia
JavaScript
November 13th, 2024

Prefetching in Inertia

Want to improve the perceived performance of your applications? Prefetching is a great first step. Here's how it works in Inertia v2.

Author
Alex Garrett-Smith
Inertia
JavaScript
November 12th, 2024

Change pagination link count in Laravel with onEachSide

Laravel's paginator allows you to control the amount of numbered links rendered for pagination. Here's how to adjust it, and how it works.

Author
Alex Garrett-Smith
Laravel
October 17th, 2024

Livewire or Inertia.js. Which one should you choose?

Both Livewire and Inertia are incredibly popular stacks for building applications in Laravel. If you're stuck choosing between the two, let's weigh which one is right for you.

Author
Alex Garrett-Smith
Livewire
Inertia
Laravel
October 15th, 2024

Disable Vite During Laravel Tests

Unless you're running end-to-end tests, you probably don't need Vite to build assets before your test suite runs.

Author
Alex Garrett-Smith
Testing
Laravel
Inertia
October 15th, 2024

Change the Default Currency of the Laravel Number Helper

If you're using the Number helper in Laravel to format currency, there's a quick and easy global way to set the default currency.

Author
Alex Garrett-Smith
Laravel
October 14th, 2024

How to Run a Specific Migration File in Laravel

If you just need to run a single migration file in Laravel, here's how to do it.

Author
Alex Garrett-Smith
Laravel

Tags