ferarandrei1/filament-page-preview
最新稳定版本:v1.0.0
Composer 安装命令:
composer require ferarandrei1/filament-page-preview
包简介
Custom Filament form field that renders a Blade preview
README 文档
README
Custom Filament form field that renders a Blade preview.
Installation
Install the package via composer:
composer require ferarandrei1/filament-page-preview
Usage
Use the PreviewField component in your Filament form:
use Feraandrei1\FilamentPagePreview\Forms\Components\PreviewField; use Filament\Forms\Form; public function form(Form $form): Form { return $form->schema([ PreviewField::make('preview_field') ->previewData([ 'user' => Auth::user()->username, 'previewRouteName' => 'preview', 'data' => $data, ]) ->nullable(), ]); }
Documentation
- Creating a Preview Route - Step-by-step guide to set up routes and controllers
- Complete Filament Page Example - Full example with two-column layout and live preview
Custom Preview View
You can publish the views to customize them:
php artisan vendor:publish --tag=filament-page-preview-views
Or, you can specify a custom view for the preview:
PreviewField::make('preview_field') ->previewView('filament.view-fields.custom-preview') ->previewData(['key' => 'value']);
Requirements
- PHP 8.1 or higher
- Filament 3.0 or higher
- Laravel 10.0 or higher
License
MIT License
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-21
