PHPackages                             dscmall/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. dscmall/laravel-ueditor

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

dscmall/laravel-ueditor
=======================

UEditor integration for Laravel.

v3.0.0(5y ago)0720MITJavaScriptPHP ^8.0

Since Nov 18Pushed 5y agoCompare

[ Source](https://github.com/dscmall/laravel-ueditor)[ Packagist](https://packagist.org/packages/dscmall/laravel-ueditor)[ RSS](/packages/dscmall-laravel-ueditor/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (16)Used By (0)

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

[](#laravel-ueditor)

UEditor integration for Laravel 5.

安装
--

[](#安装)

```
$ composer require "dscmall/laravel-ueditor:~1.0"
```

配置
--

[](#配置)

1. 添加下面一行到 `config/app.php` 中 `providers` 部分：

    ```
    Overtrue\LaravelUEditor\UEditorServiceProvider::class,
    ```
2. 发布配置文件与资源

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

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

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

    ```

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

    ```

说明
==

[](#说明)

1. 5.4+ 请不要忘记 `php artisan storage:link`
2. 如果你使用的是 laravel 5.3 以下版本，请先创建软链接： ```
    # 请在项目根目录执行以下命令
    $ ln -s `pwd`/storage/app/public `pwd`/public/storage
    ```
3. 在 `config/ueditor.php` 配置 `disk` 为 `'public'` 情况下，上传路径在：`public/uploads/` 下，确认该目录存在并可写。
4. 如果要修改上传路径，请在 `config/ueditor.php` 里各种类型的上传路径，但是都在 public 下。
5. 请在 `.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 事件的文档来使用：

### 上传中事件

[](#上传中事件)

> Overtrue\\LaravelUEditor\\Events\\Uploading

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

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

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

### 上传完成事件

[](#上传完成事件)

> Overtrue\\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

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 71.6% 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 ~140 days

Recently: every ~327 days

Total

15

Last Release

1861d ago

Major Versions

v1.3.0 → v3.0.02021-04-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/14adbbf91a457fe02616d39410c9024975328c73ed344881a8d800ce5b5e1953?d=identicon)[ectouch](/maintainers/ectouch)

---

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)")[![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)")[![codingyu](https://avatars.githubusercontent.com/u/20354841?v=4)](https://github.com/codingyu "codingyu (1 commits)")[![zhichao-poper](https://avatars.githubusercontent.com/u/141097055?v=4)](https://github.com/zhichao-poper "zhichao-poper (1 commits)")[![linhaijian99](https://avatars.githubusercontent.com/u/40174820?v=4)](https://github.com/linhaijian99 "linhaijian99 (1 commits)")[![RealZark](https://avatars.githubusercontent.com/u/16811858?v=4)](https://github.com/RealZark "RealZark (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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