Laravel Bytes

Welcome to the home for Laravel-oriented content on Fly.

Fly Machines with Laravel
Part 2

Concurrent Tasks on Machines

Previously I wrote about spinning up Fly Machines to run tasks "on-demand". Machines are great because they stop when a task finishes - no need to waste (paid) CPU cycles. However, I hand-waved over the need for concurrency. To run multiple tasks...

Read more about Concurrent Tasks on Machines
By Kathryn Anne Tan

Delayed Display of Isolated PDFs With Fly-replay and Livewire

Running our Laravel application close to our users reduces geographical latency. What's more, with Fly.io, we get to easily do global deployments with just a few commands! However, as we've established in Taking Laravel Global, files stored in one...

Read more about Delayed Display of Isolated PDFs with Fly-replay and Livewire
By Johannes Werbrouck

Invite-only Registration

How many of you remember the launch of Oneplus' first product? It was called the Oneplus One and it was marketed as the flagship killer. The name was warranted: It had flagship specs for a lower price than the flagships that time. I remember buyin...

Read more about Invite-only Registration
By Johannes Werbrouck

User Levels, Enums and Policies, Oh My!

Users are not equal. You heard me. Some users are above others. They are allowed to do more than other users. They can see things other users cannot see. Sometimes they can even remove lower-class users! Now, this is not a weirdly abstract horror ...

Read more about User Levels, Enums and Policies, oh my!
By Kathryn Anne Tan

Bridging PHP and JavaScript With Livewire

What makes Livewire a gem is how it easily allows us to communicate data, methods, and events across PHP and JavaScript. No long code, no extra syntax—just straightforward, easy PHP-JavaScript communication. The Livewire BridgeLivewire bridges th...

Read more about Bridging PHP and JavaScript with Livewire
Fly Machines with Laravel
Part 1

On-Demand Compute

We're going to learn how to use Fly Machines to run short-lived tasks efficiently. This boils down to having a process to run (an artisan command, in our case), and a VM ready to run that command. The VM will start, run the command, and stop when...

Read more about On-Demand Compute
By Kathryn Anne Tan

Offloading Data Baggage With Livewire

In Hoarding Order with Livewire we implemented a client paginated table that relies on data accumulation. Instead of waiting for an entire dataset to load, the table periodically received and accumulated smaller portions of the dataset using Livew...

Read more about Offloading Data Baggage with Livewire
By Chris Fidao

Streaming to the Browser With Livewire

We're going to see how to stream content to the browser using Livewire. 🤔 What's that mean? Here's an example from Chipper CI, which runs "builds" when you push code to git. When a command is run (perhaps composer install), the build output is str...

Read more about Streaming to the Browser with Livewire
By Chris Fidao

Global Notifications With Livewire

I've never met an app that didn't make me wish for a global notification system. What's that mean exactly? I always want an easy way to display notifications on any page of my application. It's "global" because I can show it anywhere. Livewire (an...

Read more about Global Notifications with Livewire
By Kathryn Anne Tan

Hoarding Order With Livewire

In this post we'll craft ourselves a hassle-free ordering of groupable data across table pages, and land our users a lag-free pagination experience. In order to do so, we'll use Livewire's polling feature to accumulate ordered data, and keep a cli...

Read more about Hoarding Order With Livewire
By Johannes Werbrouck

Integrating the Elastic Stack (ELK) Into a Laravel App on Fly.io

The Elastic stack is hugely powerful, and a great tool in any developer's arsenal. Since this is an intro I'll keep it simple but please let me know if you're interested in seeing more of this! You can find me on twitter or in the Laravel category...

Read more about Integrating the Elastic Stack (ELK) into a Laravel app on Fly.io
By Chris Fidao

Deus Ex Machina

I've been on the search for a remote development setup for the better part of 11 years. Originally this was due to falling in love with an underpowered Macbook Air. Now I'm older and impatient - I'm opting out of dependency hell. Recently, I lande...

Read more about Deus Ex Machina