[英]Laravel + CKEditor + CKFinder
Has anyone encountered the setting up of CKFinder in Laravel? 有人遇到过在Laravel中设置CKFinder吗? The CKEditor works fine, and when I integrate the CKFinder into it, I get this error: screenshot CKEditor工作正常,当我将CKFinder集成到其中时,出现以下错误: 屏幕截图
use this : https://github.com/ckfinder/ckfinder-laravel-package#configuring-authentication in samples you will see ckeditor and ckfinder 在样本中使用它: https : //github.com/ckfinder/ckfinder-laravel-package#configuring-authentication您将看到ckeditor和ckfinder
in git bash or cmd or terminal 在git bash或cmd或终端中
composer require ckfinder/ckfinder-laravel-package
php artisan ckfinder:download
php artisan vendor:publish --tag=ckfinder
create directory on public folder. 在公用文件夹上创建目录。 the name should be userfiles for middleware use 名称应为中间件使用的用户文件
php artisan make:middleware CustomCKFinderAuth
on config/ckfinder.php change this code: 在config / ckfinder.php上更改此代码:
$config['authentication'] = '\App\Http\Middleware\CustomCKFinderAuth';
on middleware class use 关于中间件类的使用
public function handle($request, Closure $next)
{
config(['ckfinder.authentication' => function() {
return true;
}]);
return $next($request);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.