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://www.msaied.com/public) - [Home](https://www.msaied.com/public)
- [Projects](https://www.msaied.com/public/projects)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [About](https://www.msaied.com/public#about)

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

Menu
----

Close 

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

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

 1. [Home](https://www.msaied.com/public)
2. /
3. [Articles](https://www.msaied.com/public/articles)
4. /
5. Filament v4 Schema-Based Forms: Unified Schema API and Infolist Patterns

 Filament v4 Schema-Based Forms: Unified Schema API and Infolist Patterns
=========================================================================

 Filament v4 replaces scattered form/infolist definitions with a single Schema API. Learn how unified schemas, conditional visibility, and reusable schema components reduce duplication in real Filament panels.

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

ShareCopy linkCopied

 ![Filament v4 Schema-Based Forms: Unified Schema API and Infolist Patterns](https://cdn.msaied.com/638/f9bf7d5a5195f8a61e97ccc196cf96d6.png) 

  On this page +1. [Filament v4 Schema-Based Forms and Infolists](#filament-v4-schema-based-forms-and-infolists)
2. [The Old Friction](#the-old-friction)
3. [The v4 Unified Schema](#the-v4-unified-schema)
4. [Reusable Schema Components](#reusable-schema-components)
5. [Conditional Visibility](#conditional-visibility)
6. [Practical Migration Note](#practical-migration-note)
7. [Takeaways](#takeaways)

 Filament v4 Schema-Based Forms and Infolists
--------------------------------------------

Filament v4 introduced one of its most architecturally significant changes: a **unified Schema API** that collapses the previously separate form and infolist definition surfaces into a single, composable layer. If you have built Filament v3 resources, you know the friction — `form(Form $form)` and `infolist(Infolist $infolist)` each demanded their own component trees, leading to duplicated field definitions for read and write views.

Filament v4 solves this by making `Schema` the first-class citizen.

### The Old Friction

In v3, a `TextInput` in a form and a `TextEntry` in an infolist were entirely separate classes with separate APIs. Keeping them in sync was a maintenance burden:

```php
// v3 — two separate definitions, easy to drift
public static function form(Form $form): Form
{
    return $form->schema([
        TextInput::make('email')->email()->required(),
    ]);
}

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

```

### The v4 Unified Schema

Filament v4 introduces `Schema` components that are **context-aware**: the same component tree renders as editable inputs inside a form context and as read-only entries inside an infolist context. You define the schema once and let Filament resolve the correct renderer.

```php
use Filament\Schema\Schema;
use Filament\Schema\Components\TextInput;
use Filament\Schema\Components\Section;

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

                TextInput::make('email')
                    ->email()
                    ->required(),
            ]),
    ]);
}

```

Both the `EditRecord` and `ViewRecord` pages consume this single `schema()` method. The framework injects the correct context — form or infolist — at render time.

### Reusable Schema Components

The real power emerges when you extract schemas into dedicated classes. This is the pattern I reach for on any resource with more than a handful of fields:

```php
namespace App\Filament\Schemas;

use Filament\Schema\Schema;
use Filament\Schema\Components\TextInput;
use Filament\Schema\Components\Select;

class UserIdentitySchema
{
    public static function make(): array
    {
        return [
            TextInput::make('name')->required(),
            TextInput::make('email')->email()->required(),
            Select::make('role')
                ->options(Role::class)
                ->required(),
        ];
    }
}

```

Then compose it anywhere:

```php
public static function schema(Schema $schema): Schema
{
    return $schema->components([
        ...UserIdentitySchema::make(),
        ...BillingAddressSchema::make(),
    ]);
}

```

This is clean, testable, and trivially shareable across resources, modals, and wizard steps.

### Conditional Visibility

Conditional logic works identically whether the schema is rendered as a form or infolist:

```php
TextInput::make('vat_number')
    ->visible(fn (Get $get): bool => $get('is_business') === true)
    ->required(fn (Get $get): bool => $get('is_business') === true),

```

The `Get` closure resolves live state in form context and static record state in infolist context — no branching required in your schema definition.

### Practical Migration Note

If you are migrating from v3, the key shift is:

1. Replace `form()` + `infolist()` with a single `schema()` method.
2. Swap `TextEntry`, `ImageEntry`, etc. for their unified `Schema\Components` equivalents.
3. Move shared field groups into dedicated schema classes immediately — do not let them grow inline.

Not every v3 component has a direct v4 unified equivalent yet; check the official changelog before assuming a component is context-aware.

### Takeaways

- Filament v4's unified Schema API eliminates the form/infolist duplication that plagued v3 resources.
- A single `schema()` method serves both edit and view contexts via context injection.
- Extracting schemas into plain PHP classes (`UserIdentitySchema::make()`) is the cleanest reuse pattern.
- Conditional visibility with `Get` works uniformly across both contexts.
- Migrate incrementally: start with new resources, then refactor existing ones once you verify component parity.

- [filament](https://www.msaied.com/public/articles?search=filament)
- [laravel](https://www.msaied.com/public/articles?search=laravel)
- [filament-v4](https://www.msaied.com/public/articles?search=filament-v4)
- [forms](https://www.msaied.com/public/articles?search=forms)

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

  Can I still use separate form() and infolist() methods in Filament v4?Yes. Filament v4 is backward-compatible in this regard — you can keep separate definitions. The unified schema() method is opt-in, but adopting it removes duplication and is the recommended approach for new resources.

   Do all Filament v3 components have unified equivalents in v4?Not all v3 components have been ported to the unified Schema namespace yet. Check the Filament v4 changelog and component reference before assuming a component is context-aware; some still require separate form/infolist definitions.

   How do I share a schema between a resource and a modal action in Filament v4?Extract the schema into a static method on a dedicated class and spread the result into both the resource schema() and the action's schema() call using the splat operator (...MySchema::make()). Both contexts accept the same component array.

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

[Mohamed Said](https://www.msaied.com/public#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://www.msaied.com/public#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://www.msaied.com/public/articles/the-pipeline-pattern-in-laravel-building-custom-pipelines-beyond-middleware-2) [Next articleLaravel Rulebook: Manage Business Rules That Change by Date](https://www.msaied.com/public/articles/laravel-rulebook-manage-business-rules-that-change-by-date)  

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

1. [Filament v4 Schema-Based Forms and Infolists](#filament-v4-schema-based-forms-and-infolists)
2. [The Old Friction](#the-old-friction)
3. [The v4 Unified Schema](#the-v4-unified-schema)
4. [Reusable Schema Components](#reusable-schema-components)
5. [Conditional Visibility](#conditional-visibility)
6. [Practical Migration Note](#practical-migration-note)
7. [Takeaways](#takeaways)

 ###  Have a technical challenge?

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

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

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

 [ ![](https://cdn.msaied.com/740/cce86edc21eddcbdd2f2454fadaf9c70.png)  · 3 min read### The Pipeline Pattern in Laravel: Custom Pipelines Beyond Middleware

5 Oct 2026 ](https://www.msaied.com/public/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://www.msaied.com/public/articles/mysql-full-text-search-in-laravel-indexes-relevance-scoring-and-boolean-mode) [ ![](https://cdn.msaied.com/738/073696a3fefe18bec825beec5ac658f5.png)  · 4 min read### Laravel Queue Rate-Limited Middleware: Throttling Jobs Without Losing Work

4 Oct 2026 ](https://www.msaied.com/public/articles/laravel-queue-rate-limited-middleware-throttling-jobs-without-losing-work) 

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

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

 [Discuss your project ↗](https://www.msaied.com/public#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://www.msaied.com/public)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/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://www.msaied.com/public/sitemap.xml)
