PHPackages                             eunion/laravel-ueditor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. eunion/laravel-ueditor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

eunion/laravel-ueditor
======================

UEditor integration for Laravel.

v2.0.3(5y ago)05MITJavaScript

Since Nov 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/eunion/laravel-ueditor)[ Packagist](https://packagist.org/packages/eunion/laravel-ueditor)[ RSS](/packages/eunion-laravel-ueditor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (18)Used By (0)

Laravel-UEditor
===============

[](#laravel-ueditor)

UEditor integration for Laravel 5. 路由缓存问题

安装
--

[](#安装)

```
$ composer require "eunion/laravel-ueditor:~2.0"
```

配置
--

[](#配置)

1. 发布配置文件与资源

    ```
    $ php artisan vendor:publish --provider='Eunion\LaravelUEditor\UEditorServiceProvider'
    ```
2. 模板引入编辑器

    这行的作用是引入编辑器需要的 css,js 等文件，所以你不需要再手动去引入它们。

    ```
    @include('vendor.ueditor.assets')
    ```
3. 编辑器的初始化

    ```

        var ue = UE.getEditor('container');
        ue.ready(function() {
            ue.execCommand('serverparam', '_token', '{{ csrf_token() }}'); // 设置 CSRF token.
        });

    ```

说明
==

[](#说明)

- 5.4+ 请不要忘记 `php artisan storage:link`
- 在 `config/ueditor.php` 配置 `disk` 为 `'public'` 情况下，上传路径在：`public/uploads/` 下，确认该目录存在并可写。
- 如果要修改上传路径，请在 `config/ueditor.php` 里各种类型的上传路径，但是都在 public 下。
- 请在 `.env` 中正确配置 `APP_URL` 为你的当前域名，否则可能上传成功了，但是无法正确显示。

七牛支持
----

[](#七牛支持)

如果你想使用七牛云储存，需要进行下面几个简单的操作：

1.安装和配置 [laravel-filesystem-qiniu](https://github.com/overtrue/laravel-filesystem-qiniu)

2.配置 `config/ueditor.php` 的 `disk` 为 `qiniu`:

```
'disk' => 'qiniu'
```

3.剩下时间打局 LOL，已经完事了。

> 七牛的 `access_key` 和 `secret_key` 可以在这里找到： ,在创建 `bucket` （空间）的时候，推荐大家都使用公开的空间。

事件
--

[](#事件)

你肯定有一些朋友肯定会有一些比较特殊的场景，那么你可以使用本插件提供的事件来支持：

> 请按照 Laravel 事件的文档来使用：

### 上传中事件

[](#上传中事件)

> Eunion\\LaravelUEditor\\Events\\Uploading

在保存文件之前，你可以拿到一些信息：

- `$event->file` 这是请求的已经上传的文件对象，`Symfony\Component\HttpFoundation\File\UploadedFile` 实例。
- `$event->filename` 这是即将存储时用的新文件名
- `$event->config` 上传配置，数组。

你可以在本事件监听器返回值，返回值将替换 `$filename` 作为存储文件名。

### 上传完成事件

[](#上传完成事件)

> Eunion\\LaravelUEditor\\Events\\Uploaded

它有两个属性：

- `$event->file` 与 Uploading 一样，上传的文件
- `$event->result` 上传结构，数组，包含以下信息：

    ```
    'state' => 'SUCCESS',
    'url' => 'http://xxxxxx.qiniucdn.com/xxx/xxx.jpg',
    'title' => '文件名.jpg',
    'original' => '上传时的源文件名.jpg',
    'type' => 'jpg',
    'size' => 17283,
    ```

你可以监听此事件用于一些后续处理任务，比如记录到数据库。

License
=======

[](#license)

MIT

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 65.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~108 days

Recently: every ~150 days

Total

17

Last Release

2093d ago

Major Versions

1.2.10 → 2.0.02019-10-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/2732c3ccc1ffbcacf742069c62e5a47cb05501c6a5b0f6219c88f303fde62bee?d=identicon)[demon823](/maintainers/demon823)

---

Top Contributors

[![overtrue](https://avatars.githubusercontent.com/u/1472352?v=4)](https://github.com/overtrue "overtrue (48 commits)")[![JellyBool](https://avatars.githubusercontent.com/u/6011686?v=4)](https://github.com/JellyBool "JellyBool (11 commits)")[![codingyu](https://avatars.githubusercontent.com/u/20354841?v=4)](https://github.com/codingyu "codingyu (4 commits)")[![eunion](https://avatars.githubusercontent.com/u/11865814?v=4)](https://github.com/eunion "eunion (3 commits)")[![mingyoung](https://avatars.githubusercontent.com/u/6228858?v=4)](https://github.com/mingyoung "mingyoung (2 commits)")[![venus-robot](https://avatars.githubusercontent.com/u/120213445?v=4)](https://github.com/venus-robot "venus-robot (1 commits)")[![yueziii](https://avatars.githubusercontent.com/u/30011943?v=4)](https://github.com/yueziii "yueziii (1 commits)")[![zhichao-poper](https://avatars.githubusercontent.com/u/141097055?v=4)](https://github.com/zhichao-poper "zhichao-poper (1 commits)")[![RealZark](https://avatars.githubusercontent.com/u/16811858?v=4)](https://github.com/RealZark "RealZark (1 commits)")[![linhaijian99](https://avatars.githubusercontent.com/u/40174820?v=4)](https://github.com/linhaijian99 "linhaijian99 (1 commits)")

### Embed Badge

![Health badge](/badges/eunion-laravel-ueditor/health.svg)

```
[![Health](https://phpackages.com/badges/eunion-laravel-ueditor/health.svg)](https://phpackages.com/packages/eunion-laravel-ueditor)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
