File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1
1
laravel-admin extension
2
2
======
3
3
4
+ 本扩展包是基于peinhu的[ AetherUpload-Laravel] ( https://github.com/peinhu/AetherUpload-Laravel ) 针对laravel-admin开发的大文件上传工具,
5
+ 直接用于Form组件。
6
+ -----
7
+ 1,安装:
8
+ ````
9
+ composer require laravel-admin-ext/large-file-upload
10
+ ````
11
+ 2,发布AetherUpload-laravel的静态资源:
12
+ ````
13
+ php artisan aetherupload:publish
14
+ ````
15
+ 3,上传文件配置信息在config/aetherupload.php文件中修改(详细信息请参考说明文档)
4
16
17
+ 4,发布本扩展包的静态资源:
18
+ ````
19
+ php artisan vendor:publish --provider=Encore\LargeFileUpload\LargeFileUploadServiceProvider.php
20
+ ````
21
+ 5,注册进laravel-admin,在app/Admin/bootstrap.php中添加以下代码:
22
+ ````
23
+ Encore\Admin\Form::extend('largefile', \Encore\LargeFileUpload\LargeFileField::class);
24
+ ````
25
+ 6,在控制器中直接调用就可以了:
26
+ ````
27
+ $form->largefile('ColumnName', 'LabelName');
28
+ ````
29
+ 效果如图:
30
+ 
Original file line number Diff line number Diff line change 3
3
"description" : " An extension of laravel-admin for uploading large files" ,
4
4
"type" : " library" ,
5
5
"keywords" : [" laravel-admin" , " extension" ],
6
- "homepage" : " https://github.com/Dianwoung /large-file-upload" ,
6
+ "homepage" : " https://github.com/laravel-admin-ext /large-file-upload" ,
7
7
"license" : " MIT" ,
8
8
"authors" : [
9
9
{
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ class LargeFileUpload extends Extension
8
8
{
9
9
public $ name = 'large-file-upload ' ;
10
10
11
+ public $ views = __DIR__ .'/../resources/views ' ;
12
+
11
13
public $ assets = __DIR__ .'/../resources/assets ' ;
12
14
13
15
}
You can’t perform that action at this time.
0 commit comments