Laravel-admin集成UEditor

先下载Ueditor 并解压到/public目录,比如放在/public/packages/目录下
然后新建扩展文件app/Admin/Extensions/UEditor.php

  formatName($this->column);

    $this->script = <<

新建view resources/views/admin/u-editor.blade.php

@include('admin::form.error') @include('admin::form.help-block')

然后在app/Admin/bootstrap.php中引入扩展:

use App\Admin\Extensions\UEditor;
use Encore\Admin\Form;
Form::extend('ueditor', UEditor::class);

然后就能在form中使用了:

    $form->ueditor('content');

你可能感兴趣的:(Laravel-admin集成UEditor)