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 component trees with a single Schema API. Learn how unified schemas reduce duplication, enable reuse, and change how you think about building admin UIs.

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

ShareCopy linkCopied

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

  On this page +1. [Why Filament v4 Rethought the Component Tree](#why-filament-v4-rethought-the-component-tree)
2. [The Schema Class](#the-schema-class)
3. [Reusable Schema Fragments](#reusable-schema-fragments)
4. [Context-Aware Components](#context-aware-components)
5. [Infolist-Only Entries Still Exist](#infolist-only-entries-still-exist)
6. [Practical Migration Pattern](#practical-migration-pattern)
7. [Takeaways](#takeaways)

 Why Filament v4 Rethought the Component Tree
--------------------------------------------

In Filament v3, forms and infolists were parallel but separate systems. A `TextInput` lived in `Filament\Forms\Components` while its read-only counterpart `TextEntry` lived in `Filament\Infolists\Components`. Keeping them in sync across a resource meant duplicating field definitions — a maintenance burden that grew with every new attribute.

Filament v4 introduces the **unified Schema API**: a single component tree that renders correctly in both edit and view contexts depending on where it is mounted. The mental model shifts from "define a form, then define an infolist" to "define a schema once, let the panel decide how to render it."

---

The Schema Class
----------------

At the core is `Filament\Schemas\Schema`. A resource's `form()` and `infolist()` methods both accept a `Schema` instance:

```php
use Filament\Schemas\Schema;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Select;

public static function schema(Schema $schema): Schema
{
    return $schema->components([
        TextInput::make('name')
            ->required()
            ->maxLength(255),

        Select::make('status')
            ->options(Status::class)
            ->required(),
    ]);
}

```

When this schema is mounted inside a `CreateRecord` or `EditRecord` page, components behave as form inputs. When mounted inside a `ViewRecord` page or an infolist panel, the same components render as read-only entries — no separate `TextEntry::make('name')` required.

---

Reusable Schema Fragments
-------------------------

The real payoff is extracting shared schema fragments into dedicated classes:

```php
namespace App\Filament\Schemas;

use Filament\Schemas\Schema;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;

class AddressSchema
{
    public static function make(): array
    {
        return [
            TextInput::make('address_line_1')->required(),
            TextInput::make('address_line_2'),
            TextInput::make('city')->required(),
            TextInput::make('postcode')
                ->regex('/^[A-Z0-9 ]{5,8}$/i'),
        ];
    }
}

```

Any resource that deals with addresses spreads this in:

```php
return $schema->components([
    ...AddressSchema::make(),
    TextInput::make('vat_number'),
]);

```

One change to `AddressSchema` propagates everywhere — forms, infolists, and modal actions alike.

---

Context-Aware Components
------------------------

Some components still need to behave differently in edit vs. view mode. The `->editableIn()` and `->viewableIn()` modifiers let you tune this without splitting the schema:

```php
TextInput::make('email')
    ->email()
    ->required()
    ->disabledOn('view'),

```

For richer divergence, the `->schema()` method on a `Section` accepts a closure that receives the current `$operation`:

```php
Section::make('Credentials')
    ->schema(fn (string $operation): array => match ($operation) {
        'view' => [TextEntry::make('email')],
        default => [TextInput::make('email')->required()],
    }),

```

This escape hatch keeps the unified model intact while accommodating edge cases.

---

Infolist-Only Entries Still Exist
---------------------------------

Not everything maps cleanly. `ImageEntry`, `ColorEntry`, and custom infolist-only entries remain in `Filament\Infolists\Components` and are only meaningful in view contexts. The unified schema does not force every component to be dual-purpose — it simply removes the requirement to duplicate the common ones.

---

Practical Migration Pattern
---------------------------

When upgrading a v3 resource:

1. Identify fields that appear in both `form()` and `infolist()` with matching names.
2. Replace the infolist entries with their form counterparts where a direct equivalent exists.
3. Extract the shared components into a static schema class.
4. Keep infolist-only entries (`ImageEntry`, etc.) in a dedicated `->schema()` closure guarded by `$operation === 'view'`.

---

Takeaways
---------

- The unified Schema API eliminates the form/infolist duplication that plagued v3 resources.
- Schema fragment classes are the idiomatic way to share field definitions across resources and actions.
- Context-aware modifiers (`disabledOn`, operation closures) handle the minority of cases that genuinely differ between edit and view.
- Infolist-only components still exist; the unified model is additive, not a forced abstraction.
- Migrating incrementally — resource by resource — is safe and low-risk.

- [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 
---------------------------

  Does the unified Schema API mean I can no longer use infolist-specific entries like ImageEntry?No. Infolist-only entries such as ImageEntry still exist and work as before. The unified schema removes duplication for components that have both form and view representations, but does not eliminate entries that are inherently display-only.

   Can I use schema fragment classes inside modal actions, not just full-page resources?Yes. Any place that accepts a schema — CreateAction, EditAction, custom modal actions — can spread a fragment class array into its component list, giving you the same reuse benefit outside of resource pages.

   Is it safe to migrate a single resource to the unified schema while leaving others in v3 style?Filament v4 supports incremental adoption. Resources that still define separate form() and infolist() methods continue to work. You can migrate one resource at a time without affecting the rest of the panel.

   ![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: Custom Pipelines Beyond Middleware](https://msaied.com/articles/the-pipeline-pattern-in-laravel-custom-pipelines-beyond-middleware-1) [Next articleFilament v3.3.56 Released: File Hash Names and Livewire Upload Fix](https://msaied.com/articles/filament-v3356-released-file-hash-names-and-livewire-upload-fix)  

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

1. [Why Filament v4 Rethought the Component Tree](#why-filament-v4-rethought-the-component-tree)
2. [The Schema Class](#the-schema-class)
3. [Reusable Schema Fragments](#reusable-schema-fragments)
4. [Context-Aware Components](#context-aware-components)
5. [Infolist-Only Entries Still Exist](#infolist-only-entries-still-exist)
6. [Practical Migration Pattern](#practical-migration-pattern)
7. [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/742/2d02018669cdeedccb5de2efb898f0ee.png) Filament · 3 min read### Filament v3.3.56 Released: File Hash Names and Livewire Upload Fix

5 Oct 2026 ](https://msaied.com/articles/filament-v3356-released-file-hash-names-and-livewire-upload-fix) [ ![](https://cdn.msaied.com/740/cce86edc21eddcbdd2f2454fadaf9c70.png)  · 3 min read### The Pipeline Pattern in Laravel: Custom Pipelines Beyond Middleware

5 Oct 2026 ](https://msaied.com/articles/the-pipeline-pattern-in-laravel-custom-pipelines-beyond-middleware-1) [ ![](https://cdn.msaied.com/739/2d6897fdcdcf090613f96f72a64b8a78.png)  · 4 min read### MySQL Full-Text Search in Laravel: Indexes, Relevance Scoring, and Boolean Mode

4 Oct 2026 ](https://msaied.com/articles/mysql-full-text-search-in-laravel-indexes-relevance-scoring-and-boolean-mode) 

  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)
