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

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

imnpc/laravel-ueditor
=====================

UEditor integration for Laravel.

2.0.3(4y ago)01121MITJavaScript

Since Nov 18Pushed 4y agoCompare

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

READMEChangelog (1)Dependencies (2)Versions (18)Used By (1)

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

[](#laravel-ueditor)

UEditor integration for Laravel 5.

安装
--

[](#安装)

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

配置
--

[](#配置)

1. 发布配置文件与资源

    ```
    $ php artisan vendor:publish --provider='Codingyu\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 事件的文档来使用：

### 上传中事件

[](#上传中事件)

> Codingyu\\LaravelUEditor\\Events\\Uploading

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

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

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

### 上传完成事件

[](#上传完成事件)

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

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 64.9% 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 ~144 days

Recently: every ~294 days

Total

17

Last Release

1517d ago

Major Versions

1.2.10 → 2.0.02019-10-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f149dfb0fcbc9e73b835450b3b2bd4e1b732e0d2113f519705b22f95913acae?d=identicon)[imnpc](/maintainers/imnpc)

---

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 (5 commits)")[![mingyoung](https://avatars.githubusercontent.com/u/6228858?v=4)](https://github.com/mingyoung "mingyoung (2 commits)")[![imnpc](https://avatars.githubusercontent.com/u/5801647?v=4)](https://github.com/imnpc "imnpc (2 commits)")[![linhaijian99](https://avatars.githubusercontent.com/u/40174820?v=4)](https://github.com/linhaijian99 "linhaijian99 (1 commits)")[![fpc2366423](https://avatars.githubusercontent.com/u/7971948?v=4)](https://github.com/fpc2366423 "fpc2366423 (1 commits)")[![RealZark](https://avatars.githubusercontent.com/u/16811858?v=4)](https://github.com/RealZark "RealZark (1 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)")

### Embed Badge

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

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

###  Alternatives

[tightenco/ziggy

Use your Laravel named routes in JavaScript.

4.3k41.6M267](/packages/tightenco-ziggy)[wireui/wireui

TallStack components

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

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)

PHPackages © 2026

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