Laravel Ueditor 百度编辑器 For Laravel 5<a href="https://github.com/zhangmazi/laravel-ueditor#%E5%AE%98%E7%BD%91"></a>官网<a href="https://github.com/zhangmazi/laravel-ueditor#%E7%96%91%E9%97%A 介绍
百度编辑器 For Laravel 5
支持自定义路由, 默认前后台独立控制器,支持重写方法方便自己的业务逻辑处理,支持扩展图片助手(推荐使用Intervention\Image第三方包)
官网
疑问讨论
请在issue里new一个.
授权
此Laravel 扩展包基于MIT协议开源MIT license.
安装
安装
composer require "zhangmazi/laravel-ueditor:^1.0"
ueditor#2编辑configappPHP文件在节点providers中加入)2.编辑config/app.PHP文件,在节点[providers]中加入
Zhangmazi\Ueditor\UeditorServiceProivder::class
PHP artisan vendor:publish --provider="Zhangmazi\Ueditor\UeditorServiceProivder"
相关资源配置会成功发布到:config/zhangmazi/(配置); public/assets/(静态资源);
resources/views/vendor/zhangmazi/(视图,包含demo所需).
配置
ueditor#1配置configzhangmazifilesystemPHP)1.配置config/zhangmazi/filesystem.PHP
请根据注释填写,特别要注意root和url_root,这个2个很关键,因为直接导致你是否能上传成功和是否能正常开放预览附件;
root的物理路径一定有0755或者0777(当需要建立子目录时)权限.
ueditor#2配置configzhangmaziueditorPHP)2.配置config/zhangmazi/ueditor.PHP
请根据注释填写,节点[routes]支持多组应用场景,其配置其实就Laravel的Route原生配置方法;
其中带有”group_”前缀的都不填,将不使用路由组模式; 如果”via_integrate”为true,将将适用内置命名空间,同时不要修改”uese”.
ueditor#3配置configzhangmaziext2mimePHP)3.配置config/zhangmazi/ext2mime.PHP
这个增加上传安全性的, 如果您觉得多了和少了, 请自行根据格式进行修改.
使用
Demo使用
开发此包时, 为了增加体验感, 特为大家准备了demo.
访问 http://localhost/zhangmazi/ueditor/demo/index, 其中localhost跟更改为你自己的绑定的域名.
为了安全性, 在[.env]文件中APP_DEBUG=true才能使用demo,否则无法访问以上demo相关路由地址.
如何使用
在body闭包前即body加入以下代码)1.在您的视图中, 在body闭包前(即