wisdech / laravel-uploader
富文本编辑器文件上传 Laravel 实现
v1.1.0
2024-10-14 16:53 UTC
Requires
- php: ^8.2
- illuminate/database: ^11.27
- illuminate/http: ^11.27
- illuminate/support: ^11.27
README
安装使用
前端组件
npm install @wisdech/react-editor
Laravel项目中
#添加依赖 composer require wisdech/laravel-uploader #发布迁移文件 php artisan vendor:publish --tag=uploader-migrations #运行迁移 php artisan migrate
在路由文件中
use Wisdech\Uploader\Http\Controllers\UploaderController; ... Route::post('uploader', [UploaderController::class, 'store'])->name('uploader.store');
在Editor组件中
import { Editor } from '@wisdech/react-editor'; export default function(){ return ( <Editor uploader={route('uploader.store') // 使用Ziggy route() 或路径 '/uploader'} /> ) }