🚀 I've made the Turbo Laravel package public. This package provides some backend support to apply Hotwire in Laravel. It's not battle tested yet, so I would love your help and feedback to make it better. All contributions are welcomed.
Repo:
Delegated Types is one of my favorite Active Record patterns! It surfaces the invisible hierarchy in polymorphic relations, lets you define richer models and their nesting, track data changes on the type cleanly, and so much more. Had fun writing this one!
Polymorphic relations are great, but complexity grows w/ each shared behavior. Delegated types flip this on its head, building a first-class entity for shared behavior!
Fewer entry points, less repetition, cleaner design.
@tonysmdev wrote about it here: tighten.com/insights/deleg…
I've made some changes to the Hotwire Starter Kit. Following the official Laravel Starter Kits, it now has 2FA and the auth-related routes were replaced w/ Fortify!
Also, Rails has Fizzy & Campfire as demo Hotwire apps, we'll have one for Laravel soon...
New video is out! With Turbo.js, we can deliver Turbo Streams in 3 ways: adding to the DOM, returning a special document that only contains Turbo Stream tags with a custom MIME type, or broadcasting via WS/SSE. Let's see how we can add a 4th way: HTTP Streaming (link in 🧵)
New video on how we can deploy Laravel apps with Kamal (V2!) is out! This demo app uses MySQL, Ollama, and it hints at something we'll cover in the next video: being able to stream Turbo Streams directly from HTTP (link in 🧵)