承接 botblemedia/media-manager 相关项目开发

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

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

botblemedia/media-manager

Composer 安装命令:

composer require botblemedia/media-manager

包简介

Standalone Laravel package for the Botble CMS media manager.

README 文档

README

Botble Media is a drop-in media library built for Laravel 10 and 11 projects. It provides a full UI for browsing folders, uploading files (including chunked uploads), generating thumbnails, and integrating with cloud storage drivers such as Amazon S3, DigitalOcean Spaces, Wasabi, Backblaze B2, and BunnyCDN.

Requirements

  • PHP 8.1+
  • Laravel 10 or 11
  • Database connection supported by Laravel's Eloquent ORM
  • Node/npm only if you plan to rebuild the frontend assets (precompiled assets are already shipped)

1. Install the package

composer require botblemedia/media-manager:dev-main

Heads up: the package has not been tagged with a stable release yet. If your application enforces "minimum-stability": "stable" you will see an error like Could not find a version of package botblemedia/media-manager matching your minimum-stability (stable) when installing. You can resolve this either by requiring the dev-main constraint (as above) or by lowering your minimum stability (e.g. add "minimum-stability": "dev", "prefer-stable": true to your composer.json).

The service provider and the RvMedia facade are auto-discovered through the package's composer.json, so you do not need to register them manually.【F:composer.json†L36-L44】

2. Publish assets & configuration

Publish the package resources so that you can customise them from your application:

php artisan vendor:publish --provider="Botble\\Media\\Providers\\MediaServiceProvider" --tag=BotbleMedia-media-config
php artisan vendor:publish --provider="Botble\\Media\\Providers\\MediaServiceProvider" --tag=BotbleMedia-media-translations
php artisan vendor:publish --provider="Botble\\Media\\Providers\\MediaServiceProvider" --tag=BotbleMedia-media-views
php artisan vendor:publish --provider="Botble\\Media\\Providers\\MediaServiceProvider" --tag=BotbleMedia-media-assets

Configuration files are merged under both core/media/media.php and config/media.php, so you can manage settings in whichever location suits your project.【F:src/Base/Traits/LoadAndPublishDataTrait.php†L25-L54】【F:src/Providers/MediaServiceProvider.php†L82-L118】

3. Run the migrations

The package ships with migrations for the media tables. Run them after publishing the configuration:

php artisan migrate

All migration files live under database/migrations inside the package, including updates for metadata such as folder colours and visibility flags.【F:database/migrations/2024_05_12_091229_add_column_visibility_to_table_media_files.php†L1-L41】【F:database/migrations/2023_12_07_095130_add_color_column_to_media_folders_table.php†L1-L34】

4. Configure access & routing

By default the media UI is served from /media and is protected by the web and auth middleware. You can change the prefix or middleware stack in config/media.php once the config has been published.【F:config/media.php†L4-L33】

The package also exposes granular permission flags (e.g. files.create, folders.destroy) that you can map to your application's authorisation layer.【F:config/permissions.php†L1-L38】

5. Storage drivers & environment variables

RvMedia determines the active filesystem disk via the media_driver setting (defaults to public).【F:src/RvMedia.php†L1194-L1200】 When the service provider boots, it synchronises configuration and updates Laravel's filesystem defaults so the media disk becomes the application's default storage driver.【F:src/Providers/MediaServiceProvider.php†L118-L178】

For S3-compatible drivers you can configure credentials via the package settings (media_aws_*, media_do_spaces_*, media_backblaze_*, etc.) or mirror them in your .env. Wasabi and BunnyCDN receive dedicated storage adapters during boot.【F:src/Providers/MediaServiceProvider.php†L124-L178】

If you prefer to keep uploads inside public/, set RV_MEDIA_USE_STORAGE_SYMLINK=false (the default). Otherwise, enable it to use storage:link and Laravel's public disk.【F:config/media.php†L108-L112】

6. Include the media UI in your views

The admin view at resources/views/vendor/core/media/index.blade.php renders the full manager. It pushes the header/footer assets and renders the content panel via helper methods exposed by the facade.【F:resources/views/index.blade.php†L1-L12】 You can include it directly in a route that returns the published view or embed RvMedia::renderHeader(), RvMedia::renderContent(), and RvMedia::renderFooter() in your own Blade layout.

If you need popup integration for editors or form fields, the /media/popup route serves an embeddable version of the UI.【F:routes/web.php†L5-L39】

7. Optional features

  • Chunked uploads: Enable large file uploads by setting RV_MEDIA_UPLOAD_CHUNK=true and adjusting the chunk size / max file size in the config. The package also provides a scheduled command that clears old chunk files when enabled.【F:config/media.php†L74-L105】【F:src/Providers/MediaServiceProvider.php†L180-L208】
  • Document preview: Toggle the built-in Google/Microsoft document preview providers with RV_MEDIA_DOCUMENT_PREVIEW_ENABLED and choose the provider via RV_MEDIA_DOCUMENT_PREVIEW_PROVIDER.【F:config/media.php†L106-L137】
  • Watermarks & thumbnails: Configure watermark source, opacity, and position, and control thumbnail generation through the same configuration file.【F:config/media.php†L56-L73】【F:config/media.php†L138-L144】

8. Artisan commands

When running in the console the service provider registers several artisan commands for thumbnail generation, cropping, watermark insertion, and clearing temporary chunk files. These commands are available once the package is installed and can be scheduled as needed.【F:src/Providers/MediaServiceProvider.php†L180-L208】

With these steps you can plug the Botble Media manager into an existing Laravel project and tailor it to match your storage, authorisation, and UI requirements.

Troubleshooting

Could not find a version of package botblemedia/media-manager during installation

The package is still awaiting its first tagged release, so Composer will only install it when you either:

  • Require the development branch explicitly: composer require botblemedia/media-manager:dev-main

  • Lower your application's minimum stability by adding the snippet below to composer.json (keep prefer-stable to avoid pulling in other dev dependencies):

    {
        "minimum-stability": "dev",
        "prefer-stable": true
    }

After updating composer.json, run composer update botblemedia/media-manager to retry the installation.

botblemedia/media-manager 适用场景与选型建议

botblemedia/media-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 11 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 botblemedia/media-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 botblemedia/media-manager 我们能提供哪些服务?
定制开发 / 二次开发

基于 botblemedia/media-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-09