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

ActiveLibrary

codemonkeyluffy/laravel-ueditor
===============================

UEditor integration for Laravel.

v1.0.0(4y ago)08MITJavaScript

Since Jul 22Pushed 4y ago1 watchersCompare

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

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

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

[](#laravel-ueditor)

UEditor integration for Laravel 5.

安装
--

[](#安装)

```
$ composer require "codemonkeyluffy/laravel-ueditor"
```

配置
--

[](#配置)

1. 发布配置文件与资源

    ```
    $ php artisan vendor:publish --provider='Codemonkeyluffy\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` 为你的当前域名，否则可能上传成功了，但是无法正确显示。

事件
--

[](#事件)

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

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

### 上传中事件

[](#上传中事件)

> Codemonkeyluffy\\LaravelUEditor\\Events\\Uploading

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

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

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

### 上传完成事件

[](#上传完成事件)

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

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1752d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6491ad3441669fa4d26b8852f86c0bb5728153ddbf9ac896c8a288a717e474cb?d=identicon)[CodeMonkeyLuffy](/maintainers/CodeMonkeyLuffy)

---

Top Contributors

[![CodeMonkeyLuffy](https://avatars.githubusercontent.com/u/4016890?v=4)](https://github.com/CodeMonkeyLuffy "CodeMonkeyLuffy (1 commits)")

### Embed Badge

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

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

###  Alternatives

[jacobcyl/ali-oss-storage

aliyun oss filesystem storage for laravel 5+

523566.2k7](/packages/jacobcyl-ali-oss-storage)[iidestiny/flysystem-oss

Flysystem adapter for the Oss storage.

95607.5k25](/packages/iidestiny-flysystem-oss)[xxtime/flysystem-aliyun-oss

AliYun OSS adapter for flysystem. Support PHP8. aliyuncs/oss-sdk-php ~2.6

51505.3k28](/packages/xxtime-flysystem-aliyun-oss)[apollopy/flysystem-aliyun-oss

This is a Flysystem adapter for the Aliyun OSS ~2.3

91126.6k3](/packages/apollopy-flysystem-aliyun-oss)[yangyifan/upload

上传 SDK for Laravel

12422.6k3](/packages/yangyifan-upload)[alphasnow/aliyun-oss-flysystem

Flysystem adapter for the Aliyun storage

14249.2k4](/packages/alphasnow-aliyun-oss-flysystem)

PHPackages © 2026

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