Articles

Showing 10 posts
February 22nd, 2024

Adding a Progress Bar to Livewire File Uploads

Uploading files in Livewire is super simple — but for larger files, adding a progress bar is a great idea.

Author
Alex Garrett-Smith
Livewire
Alpine.js
February 22nd, 2024

Prevent Livewire Refreshes and State Loss When Hot Reloading with Vite

If you're here, you're likely suffering from unexpected state loss in your Livewire components when using Vite.

Author
Alex Garrett-Smith
Livewire
February 21st, 2024

Securing Your Laravel Herd Sites with TLS

Laravel Herd comes with full TLS (an upgraded version of SSL) support out the box, but it's not as easy as just switching it on if you're using a build tool like Vite.

Author
Alex Garrett-Smith
Server
Laravel
January 7th, 2024

Loading States With Livewire

There are a bunch of ways to show loading states in Livewire. Let's take a look at a few methods, as well as some customisation options to fine tune your UI.

Author
Alex Garrett-Smith
Livewire
December 31st, 2023

Easily Copy Text to the Clipboard with Alpine.js

If you need to copy text to the clipboard with JavaScript, Alpine.js makes this super easy with the help of a simple plugin.

Author
Alex Garrett-Smith
Alpine.js
JavaScript
December 30th, 2023

Cleaner Loops With Laravel's Forelse Directive

If you're wrapping foreach loops around if statements in Blade, here's a much cleaner way to achieve the same thing with a single directive.

Author
Alex Garrett-Smith
Laravel
January 23rd, 2023

Using Enums as model casts in Laravel

Using accessors to return Enums from Laravel model attributes? There's an easier way.

Author
Alex Garrett-Smith
Laravel
January 11th, 2023

Change Carbon's now() value for testing

If you're working with Carbon dates, chances are your tests are going to fail at some point unless you're sure of the value returned from Carbon's now() function.

Author
Alex Garrett-Smith
Laravel
PHP
January 7th, 2023

How to Debounce Input in Vue 3

If you have (or want to implement) forms that autosave as a user types, there's a really important consideration to make when making requests to an API — the amount of requests you send.

Author
Alex Garrett-Smith
Vue
January 4th, 2023

How to check a Laravel project's version

Sure, it's pretty simple. But you're going to need check at some point.

Author
Alex Garrett-Smith
Laravel

Tags