akhaled/livewire-files 问题修复 & 功能扩展

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

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

akhaled/livewire-files

Composer 安装命令:

composer require akhaled/livewire-files

包简介

Upload and browse files using livewire

README 文档

README

Uploading file using Livewire and Tailwind.

Installation

composer require akhaled/livewire-files

Requirements

Frontend packages are required:

How to use

1. Add livewire component to your view

This component only displays a button within your content. This button is linked to tailwind modal.

@livewire('files-upload', [
    'image' => true, // accept only image, optional
    'mimes' => 'pdf,csv', // or specify mime type, optional
    'max' => 1024 // max 1024kb by default
])

2. Add scripts

...
@livewireScript
<script src="{{ mix('js/app.js') }}"></script>
@livewireSweetalertScripts
...

Configuration

php artisan vendor:publish --tag=livewire-files

Will generate global config file.

store_dir

Default is public (storage/public). You need to add the following line in config/filesystems.php under links property:

public_path('storage') => storage_path('app/public')

validation

  • image: only accept images, default = false
  • mimes: accepted mimes, default = null (accepting everything)
  • max: maximum uploaded size, default = 102400 (in kilobytes)

Plan

  • Show toast on uploaded!
  • Hide input file and show javascript link
  • Move content to modal
  • Show sweetalert popups instead of static alert
  • Add button text and button color for upload button
  • Specify upload files names
  • Move uploads to directory year/month/day

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-11-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固