rmitesh / builder-block
This is builder-block component for Filament
Requires
- filament/filament: ^3.2
- filament/forms: ^3.2
This package is auto-updated.
Last update: 2024-10-28 18:33:31 UTC
README
Builder Block is collection of prebuilt Builder block of Filament for the CMS pages. Everything will store in JSON format, using this data you can display content dynamically.
If you are using Filament fabricator then this is perfact package for your dynamic pages.
It comes with following blocks:
Installation
You can install the package via composer:
composer require rmitesh/builder-block
How to use
use Filament\Forms; use Filament\Forms\Form; use Rmitesh\BuilderBlock\Facades\BuilderBlock; public static function form(Form $form): Form { return $form ->schema([ // your components ... Forms\Components\Builder::make('content') ->blocks( BuilderBlock::make() ->get(), ), // your components ... ]); }
and if you want to add your custom blocks then you can add using addBlock
function.
BuilderBlock::make() ->addBlock( Forms\Components\Builder\Block::make('my_custom_block') ->columns(4) ->icon('heroicon-m-information-circle') ->schema([ // add your form components ]), ) ->get()
Also, you can add multiple blocks using addBlocks
function.
BuilderBlock::make() ->addBlocks([ Forms\Components\Builder\Block::make('my_custom_block_1') ->columns(4) ->icon('heroicon-m-information-circle') ->schema([ // add your form components ]), Forms\Components\Builder\Block::make('my_custom_block_2') ->columns(4) ->icon('heroicon-m-information-circle') ->schema([ // add your form components ]), ]) ->get()
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.