Filament v4 Unified Schema API: Forms &amp; Infolists | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://msaied.com) - [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [About](https://msaied.com#about)

           [  Contact](https://msaied.com#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://msaied.com)
- [ProjectsCase studies](https://msaied.com/projects)
- [ArticlesEngineering notes](https://msaied.com/articles)
- [CertificatesCredentials](https://msaied.com/certificates)
- [AboutHow I work](https://msaied.com#about)
- [ContactGet in touch](https://msaied.com#contact)

  [Start a conversation](https://msaied.com#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://msaied.com)
2. /
3. [Articles](https://msaied.com/articles)
4. /
5. Filament v4 Schema-Based Forms, Infolists, and the Unified Schema API

 Filament v4 Schema-Based Forms, Infolists, and the Unified Schema API
======================================================================

 Filament v4 replaces scattered form and infolist definitions with a single Schema API. Learn how the unified component tree works, where the old patterns break, and how to write cleaner, reusable panel UI.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://msaied.com#person) Published 4 Jul 2026 · Updated 4 Jul 2026 · 3 min read

ShareCopy linkCopied

 ![Filament v4 Schema-Based Forms, Infolists, and the Unified Schema API](https://cdn.msaied.com/360/11c59afcba98933101f65c6357f5cd1c.png) 

  On this page +1. [Why Filament v4 Rewrote the Component Model](#why-filament-v4-rewrote-the-component-model)
2. [The Schema Component Tree](#the-schema-component-tree)
3. [Extracting a Shared Schema Method](#extracting-a-shared-schema-method)
4. [Schema Components in Custom Pages and Widgets](#schema-components-in-custom-pages-and-widgets)
5. [What Actually Breaks When Upgrading](#what-actually-breaks-when-upgrading)
6. [Namespace changes](#namespace-changes)
7. [-&gt;columns() on Section](#code-gtcolumnscode-on-codesectioncode)
8. [Custom field getChildComponents()](#custom-field-codegetchildcomponentscode)
9. [Takeaways](#takeaways)

 Why Filament v4 Rewrote the Component Model
-------------------------------------------

In Filament v3 you maintained two parallel trees: `form(Form $form)` returned `$form->schema([...])` and `infolist(Infolist $infolist)` returned `$infolist->schema([...])`. The components were different classes even when they displayed the same data — a `TextInput` for editing, a `TextEntry` for viewing. Filament v4 collapses this into a **unified Schema API** where a single component tree can render in both contexts, and dedicated entry components are first-class citizens alongside field components.

---

The Schema Component Tree
-------------------------

Every layout wrapper — `Section`, `Grid`, `Tabs`, `Fieldset` — now lives under `Filament\Schemas\Components\` and is shared between forms and infolists. You import them once and use them everywhere.

```php
use Filament\Schemas\Components\Section;
use Filament\Schemas\Components\Grid;
use Filament\Forms\Components\TextInput;
use Filament\Infolists\Components\TextEntry;

public static function form(Form $form): Form
{
    return $form->schema([
        Section::make('Identity')
            ->schema([
                Grid::make(2)->schema([
                    TextInput::make('name')->required(),
                    TextInput::make('email')->email()->required(),
                ]),
            ]),
    ]);
}

public static function infolist(Infolist $infolist): Infolist
{
    return $infolist->schema([
        Section::make('Identity')
            ->schema([
                Grid::make(2)->schema([
                    TextEntry::make('name'),
                    TextEntry::make('email'),
                ]),
            ]),
    ]);
}

```

The `Section` and `Grid` imports are identical. Only the leaf components differ.

---

Extracting a Shared Schema Method
---------------------------------

Because layout wrappers are now the same class, you can extract the skeleton into a static helper and swap only the leaves.

```php
private static function identitySchema(array $fields): array
{
    return [
        Section::make('Identity')
            ->schema([
                Grid::make(2)->schema($fields),
            ]),
    ];
}

public static function form(Form $form): Form
{
    return $form->schema(self::identitySchema([
        TextInput::make('name')->required(),
        TextInput::make('email')->email()->required(),
    ]));
}

public static function infolist(Infolist $infolist): Infolist
{
    return $infolist->schema(self::identitySchema([
        TextEntry::make('name'),
        TextEntry::make('email'),
    ]));
}

```

This pattern eliminates the structural duplication that plagued v3 resources with large schemas.

---

Schema Components in Custom Pages and Widgets
---------------------------------------------

Custom pages that previously called `$this->form->fill()` now use `HasForms` or `HasInfolists` traits alongside the schema builder. The `$this->form(...)` and `$this->infolist(...)` calls accept the same unified component classes.

```php
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Schemas\Components\Section;

class EditProfilePage extends Page
{
    use InteractsWithForms;

    public function form(Form $form): Form
    {
        return $form
            ->schema([
                Section::make()->schema([
                    TextInput::make('bio')->columnSpanFull(),
                ]),
            ])
            ->statePath('data');
    }
}

```

---

What Actually Breaks When Upgrading
-----------------------------------

### Namespace changes

Any import of `Filament\Forms\Components\Section` or `Filament\Forms\Components\Grid` must move to `Filament\Schemas\Components\`. A project-wide find-and-replace handles most of it.

### `->columns()` on `Section`

In v3 you called `->columns(2)` on `Section` directly. In v4 you wrap children in `Grid::make(2)` instead. The old shorthand still works as a compatibility shim in early v4 releases, but the canonical approach is explicit `Grid`.

### Custom field `getChildComponents()`

If you built custom layout components by extending `Filament\Forms\Components\Component`, the base class has moved. Extend `Filament\Schemas\Components\Component` instead and implement `getChildComponents()` as before.

---

Takeaways
---------

- Layout components (`Section`, `Grid`, `Tabs`) are now shared across forms and infolists under `Filament\Schemas\Components\`.
- Leaf components (`TextInput`, `TextEntry`) remain context-specific but sit inside the same tree.
- Extracting a shared schema skeleton method removes structural duplication across `form()` and `infolist()`.
- The main upgrade cost is namespace replacement and swapping `->columns()` shortcuts for explicit `Grid` wrappers.
- Custom layout components must extend the new base class in `Filament\Schemas\Components\`.

- [filament](https://msaied.com/articles?search=filament)
- [laravel](https://msaied.com/articles?search=laravel)
- [filament-v4](https://msaied.com/articles?search=filament-v4)
- [admin-panel](https://msaied.com/articles?search=admin-panel)

 Frequently asked questions 
---------------------------

  Can I use a single component for both editing and viewing in Filament v4?Not for leaf components — TextInput is still edit-only and TextEntry is view-only. The unification applies to layout wrappers like Section and Grid, which are now the same class in both contexts.

   Do I need to update every resource immediately after upgrading to Filament v4?Filament v4 ships compatibility shims for the most common v3 form namespace imports, so many resources continue to work. However, the shims are not guaranteed across minor releases, so migrating namespaces early is strongly recommended.

   Where should custom layout components extend from in Filament v4?Extend Filament\\Schemas\\Components\\Component instead of the old Filament\\Forms\\Components\\Component. The API for getChildComponents() and childComponents() remains the same.

   ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)About the author
----------------

[Mohamed Said](https://msaied.com#person)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

[About](https://msaied.com#about) [GitHub ↗](https://github.com/EG-Mohamed) [LinkedIn ↗](https://www.linkedin.com/in/msaiedm/) [WhatsApp ↗](https://wa.me/201094619204) [Email Address ↗](mailto:hello@msaied.com) [My CV ↗](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)  

   [Previous articleThe Pipeline Pattern in Laravel: Building Custom Pipelines Beyond Middleware](https://msaied.com/articles/the-pipeline-pattern-in-laravel-building-custom-pipelines-beyond-middleware-1) [Next articleFrankenPHP, OPcache JIT, and Preloading: Squeezing Real Throughput from Laravel](https://msaied.com/articles/frankenphp-opcache-jit-and-preloading-squeezing-real-throughput-from-laravel-1)  

   On this page
-------------

1. [Why Filament v4 Rewrote the Component Model](#why-filament-v4-rewrote-the-component-model)
2. [The Schema Component Tree](#the-schema-component-tree)
3. [Extracting a Shared Schema Method](#extracting-a-shared-schema-method)
4. [Schema Components in Custom Pages and Widgets](#schema-components-in-custom-pages-and-widgets)
5. [What Actually Breaks When Upgrading](#what-actually-breaks-when-upgrading)
6. [Namespace changes](#namespace-changes)
7. [-&gt;columns() on Section](#code-gtcolumnscode-on-codesectioncode)
8. [Custom field getChildComponents()](#custom-field-codegetchildcomponentscode)
9. [Takeaways](#takeaways)

 ###  Have a technical challenge?

 Tell me what you’re building. I reply within two working days.

[Start a conversation](https://msaied.com#contact) 

   Related articles
-----------------

 [ ![](https://cdn.msaied.com/731/7cabd03b86a18f1db2c9ff7de1510270.png)  · 3 min read### Laravel Octane + FrankenPHP: Request Lifecycle, Shared State, and Safe Singleton Patterns

3 Oct 2026 ](https://msaied.com/articles/laravel-octane-frankenphp-request-lifecycle-shared-state-and-safe-singleton-patterns) [ ![](https://cdn.msaied.com/728/b96439f5ef5f084b44d736951875f964.png)  · 3 min read### Eloquent Custom Relations: Polymorphic Pivots, Has-One-Of-Many, and Raw Join Relations

2 Oct 2026 ](https://msaied.com/articles/eloquent-custom-relations-polymorphic-pivots-has-one-of-many-and-raw-join-relations) [ ![](https://cdn.msaied.com/727/7873d7495db459e7a6e3bfbb8835852d.png)  · 3 min read### Laravel Caching Strategies: Tags, Stampede Prevention, and Cache-Aside at Scale

2 Oct 2026 ](https://msaied.com/articles/laravel-caching-strategies-tags-stampede-prevention-and-cache-aside-at-scale-2) 

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://msaied.com#contact) 

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://msaied.com)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://msaied.com/sitemap.xml)
