martin-ro/filament-page-blocks
最新稳定版本:1.0.8
Composer 安装命令:
composer require martin-ro/filament-page-blocks
包简介
Block-Based Page Builder Skeleton for Filament Apps
README 文档
README
Filament has introduced previews and editing in modals in the Builder component: filamentphp/filament#12629
To take advantage of the new features, you can use the simplified Filament Blocks package.
Block-Based Page Builder for Filament
This is basically a lightweight version of Z3d0X's excellent Filament Fabricator Plugin.
It only provides the blocks functionality without layouts, pages, routing, etc.
Installation
You can install this package via composer:
composer require martin-ro/filament-page-blocks
Documentation
Documentation can be viewed at: https://filamentphp.com/plugins/fabricator
Creating a Page Block
php artisan make:filament-page-block MyPageBlock
This will create the following Page Block class:
use Filament\Forms\Components\Builder\Block; use MartinRo\FilamentPageBlocks\PageBlock; class MyBlock extends PageBlock { public static function getBlockSchema(): Block { return Block::make('my-page-block') ->label('My Page Block') ->icon('heroicon-o-rectangle-stack') ->schema([ // ]); } public static function mutateData(array $data): array { return $data; } }
and its corresponding blade component view:
@props([
//
])
<div>
//
</div>
Using Page Blocks in your template
<x-filament-page-blocks::page-blocks :blocks="$page->blocks" />
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 255
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-31