Update week 14Apr-21Apr - New Laravel Shopping Course, Todo List SC Volt Summaries...
Welcome to another week of work, where I'll share with you everything I've been doing and updating, both on the blog and on the YouTube channel, from April 14th to today, April 21st. As always, I'll start by sharing the general news, then move on to the technical details and some personal opinions that I'm sure you'll find interesting.
Livewire Enhancements: Custom Forms
One of the things I wasn't entirely convinced about with Livewire was its form handling. Unlike traditional Laravel, where we use the Request class, Livewire doesn't come with anything similar by default. This forces you to declare all fields at the class level, and when you have a lot of fields, it gets a bit annoying:
- Detestaba usar Formularios Largos en Laravel Livewire hasta que descrubrí.. livewire:form - https://youtu.be/UBl6gU8FgTA
But, as always, there's a solution. I discovered that with Livewire Form you can generate a class very similar to Request, and I explain it in detail in this video I've linked. It'll be useful if you're migrating from classic Laravel or want a more organized structure for your forms.
Filters, lists, and confirmations in Livewire
I also posted a summary of the Blog app on Livewire, showing how to manage the lists and filters. I like to leave these summaries by section so it's clear how each part is put together.
- App Blog - Listado, Filtro, Detalle - Laravel Livewire, Resumen - https://youtu.be/_YKwhz-x6ac
Another point I was exploring was the confirmation dialog with @wire:confirm, something I thought was really cool. Every time I read the Livewire documentation, I find something new. This directive is useful when you have destructive actions, like deleting, and need a confirmation beforehand. With a simple @wire:click plus @wire:confirm, the custom dialog appears. I explain it with visual examples in the video.
- Diálogo de Confirmación en UNA SOLA LíNEA en Laravel Livewire: Wire:Confirm - https://youtu.be/vBH8i2tIJjw
Opinion: Laravel and (not) code reuse
This was one of the most controversial videos of the week. I discuss how Laravel doesn't reuse as much code as it seems, especially in the default templates. I want to clarify that I love Laravel (otherwise, I wouldn't be uploading so much content), but I also like to offer constructive criticism.
- Laravel NO Reutiliza código - https://youtu.be/5BSjRKbMm_M
Since Laravel 5, the core is practically the same. The problem I see lies more in what comes "as a gift": dashboards, interfaces, and those small details that change too much between versions. This creates inconsistencies if you want to maintain your own projects or courses long-term.
Comparisons: Livewire vs Inertia
Another important topic is the comparison between Laravel Inertia and Livewire, something I really enjoy covering in my courses because they're two sister technologies. I always like to show how the same problem is solved with both tools.
- Resumen, Componentes de "Componentes" en Laravel Inertia- Formulario paso por paso - https://youtu.be/f3PW7BtsTgI
I uploaded a series of videos where I build a form step by step in Laravel Inertia and draw a parallel with its Livewire equivalent. I also published the summary of the To-Do List app with Inertia, which completely closes that course. Everything is now updated, and the book is also available on all platforms.
- Resumen, App de ToDo en Laravel Inertia - https://youtu.be/5t4FJZ4So8A
Livewire Shopping Cart Improvements
I took advantage of this week to review the shopping cart in Livewire, which was one of the sections I liked the least. Although it's not 100% finished yet, I'm already making several improvements.
This led me to think again about something I always say: Livewire is more complex to learn. If you're already familiar with Vue, Inertia has a much smoother learning curve. In contrast, in Livewire, you have to deal with Blade, Alpine.js, Livewire, and controllers: there are four pieces instead of two. That complicates things when you want to build more elaborate components.
Paged component in Volt...
Although it's not my favorite, I'm also uploading versions on Ball. For example, the paginated list is now available as a video and part of the course.
- Extra: Componentes de Laravel Livewire Volt, Listado paginado - https://youtu.be/VdAV24amuL0
Opinion: macOS vs Windows
I uploaded another video with an opinion on macOS vs. Windows, two systems I love but have their differences. macOS is more stable, but there are some aspects of window management that don't quite convince me.
What bothers me most is having to double-click to interact with a window that doesn't have focus. When you're working with multiple windows (like an editor and a YouTube video in the background), that becomes slow and annoying. Windows has been handling this better for years. It's a minor detail, but it adds or subtracts from the daily experience.
- Lo que MENOS me gusta de MacOS, el manejo de las ventanas es MEJORABLE! - Aprende de Windows! - https://youtu.be/b7rb5cL6ZOY
Course and book updates
I've already finished the Laravel Inertia course and book, so they're fully updated and available.
Laravel 12 Inertia 2
- Cambios hasta este momento
- Siguientes clases
- Conclusiones
With Livewire I'm a little slower, but that's because I'm being more detailed with certain parts, especially in the translations to Volt and with new features like @wire:confirm:
Laravel 12 Livewire 3
- Reemplazar enlace por botón de Flux
- Cambios hasta el momento para el Blog
- Extra: Aplicar cambios a componente de Volt
- Extra: En detalle, enlaces para el listado por tipo y categoría
New project (more advanced)
I'm starting a new course, still in its initial phase, but it will be a more advanced course. It will be accompanied by its own book, and will be a project designed for intermediate or professional users. It will have a slightly higher price tag, and I won't be sharing the source code, because the idea is to focus on more in-depth training.
I'm also considering offering early access through the academy, at a lower price, for those who want to see the development step by step.
Laravel 12 Livewire 3 - Tienda en línea
- Herramientas necesarias
- Sobre el creador
- Sobre el curso
- Crear un proyecto con Laravel Herd
- Mejorar diseño: Listado de Productos
- Vamos a mostrar el diseño para el listado de productos.
- Mejorar diseño: Agregar item desde el detalle del producto
Challenges with Laravel updates
One last thought: Laravel and Livewire update very quickly. I barely finished the Livewire and Inertia courses and already had to make modifications for Laravel 12. While these aren't radical changes, they do affect the templates and structures generated with Breeze or Jetstream. For advanced courses, this represents an additional challenge because you can't always keep them updated from scratch with each version.