PHPackages                             cube-agency/filament-constructor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. cube-agency/filament-constructor

ActiveLibrary[Admin Panels](/categories/admin)

cube-agency/filament-constructor
================================

Block constructor for Filament

v2.0.0(7mo ago)21.3k↑28.2%2MITPHPPHP ^8.2

Since Jan 3Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/cube-agency/filament-constructor)[ Packagist](https://packagist.org/packages/cube-agency/filament-constructor)[ Docs](https://github.com/cube-agency/filament-constructor)[ RSS](/packages/cube-agency-filament-constructor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (13)Versions (10)Used By (0)

Block constructor for Filament
==============================

[](#block-constructor-for-filament)

[![Latest Version on Packagist](https://camo.githubusercontent.com/49bc672a50da9c73cd250321ec893037a508732e412d266dc2748cf59ab77dbd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f637562652d6167656e63792f66696c616d656e742d636f6e7374727563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cube-agency/filament-constructor)[![GitHub Tests Action Status](https://camo.githubusercontent.com/bea3e25d52ea138e7b60a77af575bb4ae65d1d0b52b346a6be388f6388943e74/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f637562652d6167656e63792f66696c616d656e742d636f6e7374727563746f722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/cube-agency/filament-constructor/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ae2dbfd065b5f7d29f6de98563caab133b78811b9b99ffebc75b38e80a2f2f74/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f637562652d6167656e63792f66696c616d656e742d636f6e7374727563746f722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/cube-agency/filament-constructor/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/39bdb6095be382b35fee16a2c7371cc42099f659e52f848fb87c6668ac312c95/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f637562652d6167656e63792f66696c616d656e742d636f6e7374727563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cube-agency/filament-constructor)

Block constructor for Filament.

Compatibility
-------------

[](#compatibility)

Package VersionFilament Version1.x3.x2.x4.xInstallation
------------

[](#installation)

You can install the package via composer:

```
composer require cube-agency/filament-constructor
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-constructor-config"
```

Usage
-----

[](#usage)

Create your constructor block by using console command:

```
php artisan filament-constructor:create-block DoubleText
```

this will create a new class in Filament\\Constructor\\Blocks

```
namespace App\Filament\Constructor\Blocks;

use CubeAgency\FilamentConstructor\Constructor\Blocks\BlockRenderer;
use Filament\Forms\Components\Textarea;

class DoubleTextBlock extends BlockRenderer
{
    public function name(): string
    {
        return 'double_text';
    }

    public function title(): string
    {
        return __('DoubleText');
    }

    public function schema(): array
    {
        return [
            Textarea::make('first_text'),
            Textarea::make('second_text'),
        ];
    }
}
```

Add it to config

```
return [
    'blocks' => [
        'double_text' => \App\Filament\Constructor\Blocks\DoubleTextBlock::class,
    ],
];
```

Then add this field to your form

```
use CubeAgency\FilamentConstructor\Filament\Forms\Components\Constructor;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            // ...
            Constructor::make('blocks'),
            // ...
        ]);
}
```

Or you can create multiple block groups and use different blocks in each resource

```
return [
    'blocks' => [
        'double_text' => \App\Filament\Constructor\Blocks\DoubleTextBlock::class,
    ],

    'image_blocks' => [
        'double_image' => \App\Filament\Constructor\Blocks\DoubleImageBlock::class,
    ],
];
```

```
use CubeAgency\FilamentConstructor\Filament\Forms\Components\Constructor;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            // ...
            Constructor::make('blocks')->use(config('filament-constructor.image_blocks')),
            // ...
        ]);
}
```

Options
-------

[](#options)

Constructor blocks has some of the options from Builder\\Blocks.

1. To add label

```
    public function title(): string
    {
        return __('Text block');
    }
```

2. To add icon

```
  public function icon(): string
   {
       return 'heroicon-o-chat-bubble-left-right';
   }
```

3. To add maxItems

```
  public function maxItems(): int
   {
       return 1;
   }
```

4. To add columns

```
  public function columns(): int
   {
       return 6;
   }
```

To add Builder options to the constructor, add them when defining the constructor field in your page template. For example:

```
   Constructor::make('blocks')
    ->collapsible()
    ->collapsed()
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Dmitrijs Mihailovs](https://github.com/dmitrijs.mihailovs)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance77

Regular maintenance activity

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~107 days

Recently: every ~114 days

Total

7

Last Release

225d ago

Major Versions

v1.0.4 → v2.0.02025-10-06

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.0.1PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/686243?v=4)[Miks Miķelsons](/maintainers/miks)[@miks](https://github.com/miks)

---

Top Contributors

[![dmitrijsmihailovs](https://avatars.githubusercontent.com/u/6555569?v=4)](https://github.com/dmitrijsmihailovs "dmitrijsmihailovs (9 commits)")

---

Tags

laravelcube-agencyfilament-constructor

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cube-agency-filament-constructor/health.svg)

```
[![Health](https://phpackages.com/badges/cube-agency-filament-constructor/health.svg)](https://phpackages.com/packages/cube-agency-filament-constructor)
```

###  Alternatives

[guava/filament-knowledge-base

A filament plugin that adds a knowledge base and help to your filament panel(s).

206120.5k1](/packages/guava-filament-knowledge-base)[geo-sot/filament-env-editor

Access .env file though Filament admin panel

2432.3k1](/packages/geo-sot-filament-env-editor)[redberry/page-builder-plugin

Page builder plugin for filamentphp admin panel to build pages using blocks.

242.8k](/packages/redberry-page-builder-plugin)[inerba/filament-db-config

A Filament plugin for database-backed application settings and editable content, with caching and easy page generation.

329.1k](/packages/inerba-filament-db-config)[andreia/filament-ui-switcher

Add a modal with options to switch between different UI layouts and styles (colors, fonts, font sizes).

233.8k](/packages/andreia-filament-ui-switcher)[craft-forge/filament-language-switcher

Zero-config language switcher for Filament admin panels. Automatically scans available translations, renders dropdown with country flags, persists selection via sessions.

1016.4k](/packages/craft-forge-filament-language-switcher)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
