承接 igamov/filament-media-gallery 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

igamov/filament-media-gallery

最新稳定版本:v1.0.0

Composer 安装命令:

composer require igamov/filament-media-gallery

包简介

This package add support spatie media library to filament V3.x

README 文档

README

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

This package add support spatie media library to filament V3.x

I've taken inspiration from the following plugins: Json Media & Filament Spatie Media Library.

filament-media-gallery.png

Installation

You can install the package via composer:

composer require igamov/filament-media-gallery

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-media-gallery-views"

Usage

In Filament Forms

use Igamov\FilamentMediaGallery\Form\MediaGallery;

MediaGallery::make('gallery')
      ->collection('gallery')
      ->thumb('tiny_conversion')
      ->disk('disk')
      ->columnSpanFull()
      ->reorderable(true)
      ->downloadable()
      ->maxSize(1536)
      ->multiple()

In Filament Tables

To use the media gallery image column:

use Igamov\FilamentMediaGallery\Tables\Columns\MediaGalleryImageColumn;

MediaGalleryImageColumn::make('avatar')

The media gallery image column supports all the customization options of the original image column.

Passing a collection

Optionally, you may pass a collection():

use Igamov\FilamentMediaGallery\Tables\Columns\MediaGalleryImageColumn;

MediaGalleryImageColumn::make('avatar')
    ->collection('avatars')

The collection allows you to group files into categories.

By default, only media without a collection (using the default collection) will be shown. If you want to show media from all collections, you can use the allCollections() method:

use Igamov\FilamentMediaGallery\Tables\Columns\MediaGalleryImageColumn;

MediaGalleryImageColumn::make('avatar')
    ->allCollections()

Using conversions

You may also specify a conversion() to load the file from showing it in the table, if present:

use Igamov\FilamentMediaGallery\Tables\Columns\MediaGalleryImageColumn;

MediaGalleryImageColumn::make('avatar')
    ->conversion('thumb')

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.

统计信息

  • 总下载量: 54
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-28