This Week in Filament #1: August 10, 2023

I'm starting a new weekly tradition: every Wednesday/Thursday, I will publish an article with all the news about Filament from previous week.

My own tweets, tips and videos, version releases, tutorials and interesting things I encounter on forums.

There are just so many things happening with Filament after the v3 release that I'm just afraid it will be lost in the internet archive of quick tweets, so this weekly digest should solve that problem.

Enjoy this first issue!


Filament Tips From Me

Tip 1. Validation: Unique ignoreRecord

If you use validation with ->unique(), don't forget to ignore the current record in the Edit form.

Otherwise, you will have a validation error "The [field] has already been taken." in the Edit form.

Yes, it's THAT easy in Filament, just a parameter!


Tip 2. helperText() with No Options

When building reactive forms with options based on other field values, you can use helperText() with a callback function to show some text in case of no options.

In general, all Filament form methods support closures like this, so you can put custom logic.


Tip 3. Generate Resource and "Guess" Columns

You can generate Filament Resource with --generate. It will try to guess the fields from your DB schema!

php artisan make:filament-resource Category --generate

My example, with a Category model with "name" field. I didn't write/change a single line of code here.


Tutorials/Tweets from the Community


Official Releases: 3.0.8 - 3.0.15

With so many minor/fix releases happening, I will highlight only some of the new features I found interesting over the last week or so.

You can check out all the versions on the official Releases page.


That's it for this first issue of "This Week in Filament".

Let me know what you think, in the comments!


If you want more Filament examples, you can find more real-life projects on our FilamentExamples.com.

No comments or questions yet...

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 59 courses (1057 lessons, total 42 h 44 min)
  • 78 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord

Recent Premium Tutorials