|
| 1 | +--- |
| 2 | +title: "All About the Filament v4 Beta Release" |
| 3 | +slug: alexandersix-all-about-the-filament-v4-beta-release |
| 4 | +author_slug: alexandersix |
| 5 | +publish_date: 2025-04-25 |
| 6 | +categories: [general] |
| 7 | +type_slug: news |
| 8 | +--- |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +## It's time for v4 Beta details |
| 13 | + |
| 14 | +We've had a lot of exciting news come from the Filament project over the past |
| 15 | +few years, but none has been more avidly requested than news on the v4 |
| 16 | +release. Well, today, in this post, we're going to drop some exciting details |
| 17 | +about the v4 Beta that will be released in the near future. Get excited, |
| 18 | +because it's almost time! |
| 19 | + |
| 20 | +## Filament v4 |
| 21 | + |
| 22 | +Filament v4 is the biggest, most feature-packed release that Filament has |
| 23 | +ever had. Honestly, until I looked hard into all of the features that are |
| 24 | +being released, I was pretty skeptical of that. After all, Filament v3 |
| 25 | +was a MASSIVE release that was over 100 minor versions in the making! |
| 26 | +We're pumped for all of you in the Filament community to get your hands |
| 27 | +on v4 and let us know what you think of all the hard work that the team |
| 28 | +has poured into this latest major release! |
| 29 | + |
| 30 | +Before we get to the launch details (ooooh the suspense!), let's talk a bit |
| 31 | +about some of the features that the team is most excited about that are |
| 32 | +coming in Filament v4: |
| 33 | + |
| 34 | +### Nested Resources |
| 35 | + |
| 36 | +One of the longest-running requests that we've received for Filament is |
| 37 | +to build nested resources right into Filament. Now, with v4, we've done |
| 38 | +just that! |
| 39 | + |
| 40 | +For those who may have never heard of nested resources, what these will |
| 41 | +allow you to do is operate on a given Filament resource within the context |
| 42 | +of a parent resource. For example, when working on a learning-management |
| 43 | +system, you'd likely have a `CourseResource` class to back your `Course` |
| 44 | +model. Within a `Course`, you'd also likely have many related `Lesson` |
| 45 | +objects that contain the actual lesson material. |
| 46 | + |
| 47 | +Previously, in v3, you could edit related `Lesson` records via a modal |
| 48 | +within the `CourseResource`. This would open a modal with a form where |
| 49 | +you could make your adjustments. However, in the case of something like |
| 50 | +a `Lesson`, a simple modal form may not actually be enough. Instead, you |
| 51 | +may have preferred to edit a `Lesson` in the context of its related |
| 52 | +`Course`, but in a full page. Now, in v4, nested resources allow you to |
| 53 | +do these edits of a child resource in the context of its parent. |
| 54 | + |
| 55 | +Creating a nested resource is easy--you use the `make:filament-resource` |
| 56 | +command as you would to create a normal resource, but you tack on |
| 57 | +the `--nested` flag. Once done, you will end up with a `Resource` |
| 58 | +class that is connected to its parent resource and can be edited |
| 59 | +in the context of its parent. |
| 60 | + |
| 61 | +We're really excited about this addition, and we hope that it's |
| 62 | +a simple, enjoyable solution that you can use in your Filament applications! |
| 63 | + |
| 64 | +### Multi-Factor Authentication |
| 65 | + |
| 66 | +For a long time, the Panel package within Filament has included an authentication |
| 67 | +system for logging in, registering, etc. Without any tweaks, this system |
| 68 | +has worked extremely well for lots of applications. However, while a |
| 69 | +standard email/password only authentication system works for many apps, we |
| 70 | +fully acknowledge that there's a need for more layers of security built |
| 71 | +in for other types of applications. |
| 72 | + |
| 73 | +In general, we consider multi-factor authentication to be almost a |
| 74 | +necessity in the modern era of application authentication, so in an |
| 75 | +effort to help developers build more secure applications, we've done |
| 76 | +the heavy lifting for you! |
| 77 | + |
| 78 | +In the interest of giving developers more options, we have upgraded our |
| 79 | +authentication system for v4 to include multi-factor authentication as an |
| 80 | +option out of the box! When MFA is enabled by the application developer, |
| 81 | +users will need to take an additional step when registering and logging |
| 82 | +into the application to set up multi factor auth. You can allow users to |
| 83 | +use either the Google two-factor auth system (ex: Google Authenticator) or |
| 84 | +the email code authentication system (ex: sending a one-time password to |
| 85 | +the given email address). |
| 86 | + |
| 87 | +That's it! All you have to do is enable the system and Filament will |
| 88 | +do the work for you! No setting up the MFA registration UI, no managing |
| 89 | +the MFA authentication flow; it's all taken care of with the flip of a switch. |
| 90 | + |
| 91 | +### Static Table Data |
| 92 | + |
| 93 | +Another common request that we've heard a lot over the years is allowing |
| 94 | +developers to use Filament tables with data that isn't backed by a `Model` |
| 95 | +class. In the past, our recommendation has been to create a "Model" backed |
| 96 | +by [Sushi](https://usesushi.dev/), but this doesn't work in all situations. |
| 97 | + |
| 98 | +Because of this, we have spent a lot of time going back to the drawing |
| 99 | +board for Filament's tables, and they are now able to take in static, non-Model |
| 100 | +data and display them with all of the same features and niceties that you |
| 101 | +know and love from the existing Filament tables package! |
| 102 | + |
| 103 | +To add static data to a Filament table, it's as simple as passing an array |
| 104 | +of the data that you'd like to display into the `records()` method that |
| 105 | +is now present on the `Table` object. Once you've done that, Filament |
| 106 | +will render out whatever data you passed in. Nice and simple! |
| 107 | + |
| 108 | +### Unified Schemas & Actions |
| 109 | + |
| 110 | +While we were ripping out the Filament Tables package and rebuilding it |
| 111 | +for static data, we figured it was a good time to perform some restructuring |
| 112 | +of the Forms, Infolists, and Actions as well. |
| 113 | + |
| 114 | +In v3, Form components live in the `Forms` namespace and Infolist components |
| 115 | +live in the `Infolist` namespace. However, as we stepped back and looked |
| 116 | +at these two systems, we noticed that they have a lot in common and could |
| 117 | +benefit a lot by being intertwined. So, in v4 we have migrated all Form |
| 118 | +and Infolist components into the `Schema` namespace. This means that you'll |
| 119 | +have one less namespace to worry about, but more importantly, you can now |
| 120 | +mix and match Form and Infolist components in the same Schema area! |
| 121 | + |
| 122 | +In a similar vein, in Filament v3, Actions have always been a bit of a tripping |
| 123 | +hazard for developers of all levels. When going to use an Action, it was |
| 124 | +fairly common to start typing out the `Action` class into your code editor, |
| 125 | +just to have it autocomplete the import for the _wrong_ `Action` class. |
| 126 | +Additionally, when creating custom Actions, it was far too easy to accidentally |
| 127 | +extend the wrong Action or to need to create multiples of the same Action |
| 128 | +just to use it in a Form, Infolist, Table, etc. To combat all of this, we |
| 129 | +have updated Actions to (almost) all extend from the same base Action class. |
| 130 | +This then means that you'll practically never import the wrong Action class |
| 131 | +again, and, more importantly, you can now create Actions that are reusable |
| 132 | +across multiple different Filament packages (Forms, Infolists, Tables, etc.). |
| 133 | + |
| 134 | +### Performance Improvements |
| 135 | + |
| 136 | +Last, but certainly not least, the team has been hard at work knocking |
| 137 | +out some incredible performance improvements within the Filament codebase. |
| 138 | +We've scoured each and every class to figure out where the biggest bottlenecks |
| 139 | +existed in v3, and in doing so, we have seen **MASSIVE** performance boost |
| 140 | +in specific applications when upgrading to Filament v4. There's a lot of |
| 141 | +technical details surrounding these performance enhancements that we'll |
| 142 | +likely need to make an entirely separate post about, but when you get your |
| 143 | +hands on v4, let us know if you notice your applications running more quickly |
| 144 | +after the upgrade! |
| 145 | + |
| 146 | +## The announcement we've all been waiting for |
| 147 | + |
| 148 | +Speaking of getting our hands on the v4 Beta, by reading all of the way |
| 149 | +through this post (I _know_ you didn't just skip down here, right?), I think |
| 150 | +you've earned the right to know that the Filament team has officially settled |
| 151 | +on a v4 Beta release date. |
| 152 | + |
| 153 | +You won't have to wait much longer, because we will be releasing the Filament v4 Beta on June 10, 2025 at [Laravel Live UK](https://laravellive.uk)! |
| 154 | + |
| 155 | +We're so excited for you all to get your hands on v4 and let us know. Remember |
| 156 | +that this upcoming release **IS STILL JUST A BETA**, so we don't recommend |
| 157 | +using this in any production or otherwise mission-critical applications. |
| 158 | + |
| 159 | +What are you most excited for in v4? Hit us up on Twitter or Bluesky |
| 160 | +and let us know what you're looking forward to most! |
0 commit comments