PHP code example of riverslei / laravel-ueditor

1. Go to this page and download the library: Download riverslei/laravel-ueditor library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

riverslei / laravel-ueditor example snippets


Riverslei\UEditor\UEditorServiceProvider::class,

'core' => [
    'route' => [
       // 'middleware' => 'auth',
    ],

    'mode'=>'local',//上传方式,local 为本地   qiniu 为七牛
	
	'baseurl'=>'http://localhost/llaravel/public',// 设置网站的根路由(可访问到index.php的路由)

    //七牛配置,若mode='qiniu',以下为必填.
    'qiniu'=>[
        'accessKey'=>'',// 可在七牛中查看到
        'secretKey'=>'',// 可在七牛中查看到
        'bucket'=>'',// 使用的七牛空间名称
        'url'=>'http://xxxx.qiniucdn.com',//七牛分配的CDN域名,注意带上http://

    ]
],

public function index()
{
return view('vendor.UEditor.test');
}

Route::get('/', 'HomeController@index');
artisan
php artisan vendor:publish