我尝试使用Laravel文件管理器,当我必须通过输入以下内容创建配置文件时,我到达了这一步:
php artisan vendor:publish --tag=lfm_config
php artisan vendor:publish --tag=lfm_public
它说成功但我无法在config/lpm.php
中找到。当我点击按钮时,它会在这个地址给我一个404:
http://blog.dev/file-manager?type=image
那么我该怎么做才能解决这个问题呢?如果需要,可以使用javascript文件:
<script type="text/javascript">
$(document).ready(function() {
// Define function to open filemanager window
var lfm = function(options, cb) {
var route_prefix = (options && options.prefix) ? options.prefix : '/laravel-filemanager';
window.open(route_prefix + '?type=' + options.type || 'file', 'FileManager', 'width=900, height=600');
window.SetUrl = cb;
};
// Define LFM summernote button
var LFMButton = function(context) {
var ui = $.summernote.ui;
var button = ui.button({
contents: '<i class="note-icon-picture"></i> ',
tooltip: 'Insert image with filemanager',
click: function() {
lfm({type: 'image', prefix: '/file-manager'}, function(url, path) {
context.invoke('insertImage', url);
});
}
});
return button.render();
};
// Initialize summernote with LFM button in the popover button group
// Please note that you can add this button to any other button group you'd like
$('#summernote-editor').summernote({
toolbar: [
['popovers', ['lfm']],
],
buttons: {
lfm: LFMButton
}
})
});
</script>