Php unisharp文件管理器不适用于laravel 5.6
我已经在我的项目上完全安装了freshPhp unisharp文件管理器不适用于laravel 5.6,php,laravel,file-manager,Php,Laravel,File Manager,我已经在我的项目上完全安装了freshunisharp filemanager 1.8 我使用了TinyMCE和CKeditor <script src="//cdn.tinymce.com/4/tinymce.min.js"></script> <textarea name="content" class="form-control my-editor"></textarea> <script> var editor_confi
unisharp filemanager 1.8
我使用了TinyMCE
和CKeditor
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<textarea name="content" class="form-control my-editor"></textarea>
<script>
var editor_config = {
path_absolute: "/",
selector: "textarea.my-editor",
plugins: [
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen",
"insertdatetime media nonbreaking save table contextmenu directionality",
"emoticons template paste textcolor colorpicker textpattern"
],
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media",
relative_urls: false,
file_browser_callback: function (field_name, url, type, win) {
var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
var y = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;
var cmsURL = editor_config.path_absolute + 'laravel-filemanager?field_name=' + field_name;
if (type == 'image')
{
cmsURL = cmsURL + "&type=Images";
} else {
cmsURL = cmsURL + "&type=Files";
}
tinyMCE.activeEditor.windowManager.open({
file: cmsURL,
title: 'Filemanager',
width: x * 0.8,
height: y * 0.8,
resizable: "yes",
close_previous: "no"
});
}
};
tinymce.init(editor_config);
</script>
有人能帮忙吗?我遇到了同样的问题,结果我只是硬编码了它,它对我很有用
Route::group(['prefix' => 'laravel-filemanager', 'middleware' => ['web', 'auth']], function () {
'\vendor\uniSharp\LaravelFilemanager\Lfm::routes()';
}))
然后我运行了php artisan vendor:publish--tag=lfm_config
并输出:
将文件[/vendor/unisharp/laravel filemanager/src/config/lfm.php]复制到[/config/lfm.php]
发布完成。
还运行了php artisan vendor:publish--tag=lfm_public,输出:
Copied Directory [/vendor/unisharp/laravel-filemanager/public] To [/public/vendor/laravel-filemanager] Publishing complete.
然后您需要php artisan路由:清除
还跑
php artisan配置:清除此设置
路径_绝对值:“”,
与:
绝对路径:“{{url('/')}}/”
在您的视图文件脚本中。很抱歉,在您回答此问题这么久之后打扰您。我也遇到了同样的问题,按照你的指示在当地解决了。但在我的Web服务器上,laravel应用程序位于webroot的下两个子文件夹中,我仍然有相同的问题(其他所有内容都是相同的)。当我在我的CKeditor中点击“在服务器上浏览”上传图像时,我会收到与上面相同的错误消息。你能帮忙吗?我不确定这是如何使用CKeditor的。你能把代码贴到某个地方看看发生了什么吗。我认为CKeditor所走的道路不知何故没有看到所做的更改。
Copied Directory [/vendor/unisharp/laravel-filemanager/public] To [/public/vendor/laravel-filemanager] Publishing complete.