drpshtiwan/livewire-media-selector 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

drpshtiwan/livewire-media-selector

最新稳定版本:3.0.0

Composer 安装命令:

composer require drpshtiwan/livewire-media-selector

包简介

A Livewire-powered media selector for Laravel, similar to WordPress media library.

README 文档

README

Packagist Version Total Downloads License Tests Code Style: Laravel Pint PHP Version

A lightweight, WordPress-style media selector for Laravel applications powered by Livewire.
Full documentation: livewire-media.thejano.com

Screenshots

Media selector preview

Video demo

Watch the demo on YouTube

Features

  • Browse, search, and paginate media stored on your Laravel disks
  • Upload new files (respecting size, extension, and mime limits)
  • Single or multiple selection with drag-to-reorder support
  • Optional collections to group media per feature (e.g. gallery, avatars)
  • Trait helpers (attachMedia, syncMedia, getMediaUrl) for quick model integration
  • Soft delete, restore, and optional trash tab when you need moderation
  • Emits Livewire/browser events so you can react to uploads, deletes, and selections

UX & i18n updates

  • Action buttons are hidden by default and appear on hover (non-interactive when hidden)
  • Clear, thicker selection ring with offset for better contrast
  • Select File tab is the default when the modal opens
  • New can_upload config and :canUpload attribute to disable Upload tab and uploads
  • RTL support (auto when locale is Arabic/Kurdish/etc.); key positions flip in RTL
  • Translations included (English, Arabic, Kurdish/Sorani) with publishable lang files
  • Component inherits your app’s font-family

Installation

Requirements

  • PHP >= 8.1
  • Laravel 10–12
  • Livewire 3.3+ or 4.x

Note: Livewire 3+ requires Laravel 10+. If you need Laravel 9 support, a Livewire v2–compatible variant is required (not included in this package version).

Require the package:

composer require drpshtiwan/livewire-media-selector

Publish the config (optional):

php artisan vendor:publish --tag=media-selector-config

Publish the migration and run it:

php artisan vendor:publish --tag=media-selector-migrations
php artisan migrate

Ensure your public disk is set up and linked:

php artisan storage:link

Publish the views (optional, if you want to customize the markup/classes):

php artisan vendor:publish --tag=media-selector-views

Publish the assets (CSS):

php artisan vendor:publish --tag=media-selector-assets --force

Simple usage:

<livewire:media-selector wire:model="media" collection="gallery" />

Read the docs for setup details, configuration options, and integration patterns.

Changelog

See CHANGELOG.md for recent and upcoming changes.

Developer

Developed and maintained by drpshtiwan.

License

MIT License. See LICENSE for details.

统计信息

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

GitHub 信息

  • Stars: 18
  • Watchers: 0
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固