statikbe/laravel-filament-flexible-blocks-asset-manager

为 Filament Flexible Blocks 包提供简单的文档和图片管理器。

This package is auto-updated.

Last update: 2024-09-21 14:38:55 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

此包为 Laravel Filament Flexible Content Blocks 包提供简单的文档和图片管理器。

主要功能包括

安装

您可以通过 Composer 安装此包

composer require statikbe/laravel-filament-flexible-blocks-asset-manager

您可以使用以下命令发布和运行迁移

php artisan vendor:publish --tag="filament-flexible-blocks-asset-manager-migrations"
php artisan migrate

您可以使用以下命令发布配置文件

php artisan vendor:publish --tag="filament-flexible-blocks-asset-manager-config"

可选地,您可以使用以下命令发布翻译

php artisan vendor:publish --tag="filament-flexible-blocks-asset-manager-translations"

与 Filament Flexible Content Blocks 包一起设置

要将插件与 Filament 集成,您需要将其添加到 filament 服务提供者的面板中。请参阅下面的代码示例

public function panel(Panel $panel): Panel
{
    return $panel
        ->default()
        //...
        ->plugins([
            SpatieLaravelTranslatablePlugin::make()
                ->defaultLocales(['nl']),
            //...
            FilamentFlexibleBlocksAssetManagerPlugin::make()
        ]);
}

然后,要在调用行动中使用资产管理器,您必须将其添加到 Filament Flexible Content Blocks 包的配置中

return [
    //...
     
    'call_to_action_models' => [
        [
            'model' => \Statikbe\FilamentFlexibleBlocksAssetManager\Models\Asset::class,
            'call_to_action_type' => \Statikbe\FilamentFlexibleBlocksAssetManager\Filament\Form\Fields\Blocks\Type\AssetCallToActionType::class,
        ],
        //...
        //\App\Models\TranslatablePage::class,
    ],
        
    //...
]

配置

配置文件为 filament-flexible-blocks-asset-manager.php,完全注释,以解释每个配置选项。

变更日志

请参阅 CHANGELOG 以获取有关最近更改的更多信息。

贡献

请参阅 CONTRIBUTING 获取详细信息。

安全漏洞

请审查 我们的安全策略 以了解如何报告安全漏洞。

致谢

许可

MIT 许可证 (MIT)。请参阅 许可文件 获取更多信息。