Filament v4 Unified Schema API: Forms &amp; Infolists | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com) [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles  ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

  [ home ](https://msaied.com)    [ articles ](https://msaied.com/articles)    Filament v4 Schema-Based Forms: Unified Schema API and Infolist Patterns        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: Unified Schema API and Infolist Patterns](https://cdn.msaied.com/638/f9bf7d5a5195f8a61e97ccc196cf96d6.png)

  #filament   #laravel   #filament-v4   #forms  

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

     7 Sep 2026      3 min read    ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said  

       Table of contents

1. [  01   Filament v4 Schema-Based Forms and Infolists  ](#filament-v4-schema-based-forms-and-infolists)
2. [  02   The Old Friction  ](#the-old-friction)
3. [  03   The v4 Unified Schema  ](#the-v4-unified-schema)
4. [  04   Reusable Schema Components  ](#reusable-schema-components)
5. [  05   Conditional Visibility  ](#conditional-visibility)
6. [  06   Practical Migration Note  ](#practical-migration-note)
7. [  07   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.

 Found this useful?

          [  ](https://twitter.com/intent/tweet?url=https%3A%2F%2Fmsaied.com%2Farticles%2Ffilament-v4-schema-based-forms-unified-schema-api-and-infolist-patterns&text=Filament+v4+Schema-Based+Forms%3A+Unified+Schema+API+and+Infolist+Patterns) [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fmsaied.com%2Farticles%2Ffilament-v4-schema-based-forms-unified-schema-api-and-infolist-patterns) 

 Frequently Asked Questions 
----------------------------

  3 questions  

     Q01  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. 

      Q02  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. 

      Q03  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. 

  Continue reading

 More Articles 
---------------

 [ View all    ](https://msaied.com/articles) 

 [ ![The Pipeline Pattern in Laravel: Building Custom Pipelines Beyond Middleware](https://cdn.msaied.com/637/1b6b067bc3805768f8e1f546d2ba7545.png) laravel pipeline clean-architecture 

### The Pipeline Pattern in Laravel: Building Custom Pipelines Beyond Middleware

Laravel's Pipeline class powers middleware, but it's equally powerful for domain workflows. Learn how to build...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 6 Sep 2026     3 min read  

  Read    

 ](https://msaied.com/articles/the-pipeline-pattern-in-laravel-building-custom-pipelines-beyond-middleware-2) [ ![Eloquent N+1 Elimination: Eager Loading Strategies and Query Deduplication at Scale](https://cdn.msaied.com/636/87a71d1826f8c6cce958da8377a0bdb9.png) laravel eloquent performance 

### Eloquent N+1 Elimination: Eager Loading Strategies and Query Deduplication at Scale

N+1 queries silently destroy Laravel app performance. This guide covers eager loading strategies, query dedupl...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 6 Sep 2026     4 min read  

  Read    

 ](https://msaied.com/articles/eloquent-n1-elimination-eager-loading-strategies-and-query-deduplication-at-scale) [ ![Laravel Job Middleware: Rate Limiting, Throttling, and Skipping Jobs Without Hacks](https://cdn.msaied.com/635/e10d72c500d7a25f077552f3098478e8.png) laravel queues job-middleware 

### Laravel Job Middleware: Rate Limiting, Throttling, and Skipping Jobs Without Hacks

Job middleware in Laravel lets you wrap queue job execution with reusable logic. Learn how to build rate-limit...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 6 Sep 2026     4 min read  

  Read    

 ](https://msaied.com/articles/laravel-job-middleware-rate-limiting-throttling-and-skipping-jobs-without-hacks) 

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

Explore

- [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [Contact](https://msaied.com#contact-section)

Connect

- [   hello@msaied.com ](mailto:hello@msaied.com)
- [   +20 109 461 9204 ](tel:+201094619204)

© 2026 Mohamed Said. All rights reserved.

 [  ](https://github.com/EG-Mohamed) [  ](https://www.linkedin.com/in/msaiedm/) [  ](https://wa.me/201094619204) [  ](mailto:hello@msaied.com) [  ](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
