有人002 / filemanager
多语言文件管理包
Requires
- php: ^8.0.2
- dflydev/apache-mime-types: ^1.0
- illuminate/config: 9.*
- illuminate/database: 9.*
- illuminate/support: 9.*
- intervention/image: ^2.4
- nesbot/carbon: ^2.0
Suggests
- socialiteproviders/dropbox: For Dropbox login and unlocking the integration in de file picker
- socialiteproviders/microsoft-graph: For Microsoft login and unlocking the OneDrive integration in the file picker
- dev-L5.8
- dev-L8.x
- 3.0.0-alpha
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.1.0-alpha.7
- 2.1.0-alpha.6
- 2.1.0-alpha.5
- 2.1.0-alpha.4
- 2.1.0-alpha.3
- 2.1.0-alpha.2
- 2.1.0-alpha.1
- 2.1.0-alpha
- 2.0.0
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3
- 0.2
- 0.1
- dev-sidebar-and-ajax
- dev-L9.x
- dev-L6.x/L7.x
- dev-index-view-fix
- dev-master
- dev-dropbox-integration
- dev-L5.5
This package is auto-updated.
Last update: 2024-08-30 01:22:51 UTC
README
- 基于 https://web.archive.org/web/20160425103612/http://laravelcoding.com:80/blog/laravel-5-beauty-upload-manager?tag=L5+Beauty 的多语言文件管理包
- 使用
intervention/image
创建图像转换(受matriphe/imageupload
启发)。 - 现在可以一次选择多个文件使用本地存储
- 与 Dropbox 集成,可以直接从 Dropbox 加载文件
安装
要求
- Laravel
- 5.2(版本 0.x),
- 5.5(版本 1.x/2.0),
- 5.6/5.7/5.8(版本 2.1)
- 6.x/7.x(版本 2.2)
- 8.x(版本 2.3)
- Twitter Bootstrap 4
- Jquery 3.5
Composer
composer require iemand002/filemanager
注册(当不使用自动发现时)
在您的 app.php 配置中注册提供者
'providers' => [ Iemand002\Filemanager\FilemanagerServiceProvider::class, ], 'aliases' => [ 'Filemanager' => Iemand002\Filemanager\FilemanagerFacade::class, ],
发布配置
配置文件
config/filemanager.php
php artisan vendor:publish --provider="Iemand002\Filemanager\FilemanagerServiceProvider" --tag="config"
迁移文件(可选)
2017_12_29_004110_create_image_upload_table.php 和 2018_05_12_161010_create_social_logins_table 和 2019_02_17_141025_alter_image_upload_table.php
php artisan vendor:publish --provider="Iemand002\Filemanager\FilemanagerServiceProvider" --tag="migration"
视图
vendor/iemand002/filemanager
php artisan vendor:publish --provider="Iemand002\Filemanager\FilemanagerServiceProvider" --tag="views"
翻译
lang/vendor/filemanager
php artisan vendor:publish --provider="Iemand002\Filemanager\FilemanagerServiceProvider" --tag="translations"
配置云:Dropbox/OneDrive(可选)
此包使用 socialiteproviders/dropbox
进行 Dropbox 登录和/或 socialiteproviders/graph
。要使其工作,请按照文档中的步骤 2 - 4 操作。
之后,将关系添加到您的 User
模型中的 Social
模型
public function socials() { return $this->hasMany('Iemand002\Filemanager\Models\Social'); }
如何使用
使用 php artsan migrate
运行迁移
只需访问 yourwebsite.io/admin/upload
默认情况下,它具有 Laravel 5.2+ 的 web
中间件。
要更改所需的中间件和前缀,请更改配置文件。
通过 uploadId 在您的 blade 模板中获取上传文件的 URL: {{ Filemanager::getUrl(123) }}
如果您想显示图像的转换版本,请添加可选的 $transfromHandle
:{{ Filemanager::getUrl(123, "transformHandle") }}
通过 uploadId 获取图像的宽度和高度:{{ Filemanager::getWidth(123) }}
和 {{ Filemanager::getHeight(123) }}
还与 transform 兼容:{{ Filemanager::getWidth(123, "transformHandle") }}
和 {{ Filemanager::getHeight(123, "transformHandle") }}
想将文件夹中较早上传的文件与数据库同步?访问 yourwebsite.io/admin/sync
以将数据库中缺少的文件添加。
演示
创建以下类似路由以查看示例用法。
Route::get('demo',function () { return view('iemand002/filemanager::demo.demo'); });
内置语言
- 荷兰语(nl)
- 英语(en)
TODO
- 找出图形登录的问题,它有时会出错,但有时会正常工作
- 如果从云中删除文件,则在数据库中删除云引用
- 更新视图以兼容 Bootstrap 4
变更日志
2.3.2
修复
- DataTables 分页和搜索未更新选择器事件
- 面包屑路径中不应包含 Dropbox 路径
- 修复多选框逻辑