martin-ro/filament-blocks
最新稳定版本:v1.0.7
Composer 安装命令:
composer require martin-ro/filament-blocks
包简介
README 文档
README
Provides a block builder for Filament. Blocks can be setup in the backend and rendered on the front-end.
Installation
You can install this package via composer:
composer require martin-ro/filament-blocks
Creating a Block
php artisan make:filament-block Hero/MyHero
This will create the following Block class:
use Filament\Forms\Components\Builder\Block; use MartinRo\FilamentBlocks\PageBlock; class MyHero extends FilamentBlock { public static function getBlockSchema(): Block { return Block::make('hero.my-hero') ->label('Hero: My Hero') ->icon('heroicon-o-rectangle-stack') ->preview('components.blocks.hero.my-hero') ->schema([ // ]); } }
and its corresponding blade component view:
@props([
//
])
<div>
//
</div>
Using Blocks in your template
<x-filament-blocks::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.
统计信息
- 总下载量: 48
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2024-09-04