File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ Package hổ trợ bạn tích hợp các dịch vụ lưu trữ đám mây (clo
20
20
21
21
Các dịch vụ lưu trữ đang được hổ trợ:
22
22
23
- + ** [ Viettel] ( https://viettelidc.com.vn ) **
23
+ + ** [ Viettel Cloud Storage ] ( https://viettelidc.com.vn/cloud-storage ) **
24
24
25
25
26
26
## Cài đặt
Original file line number Diff line number Diff line change
1
+ Viettel Cloud Storage
2
+ ===============================
3
+
4
+ ### Cài đặt
5
+
6
+ Để sử dụng được dịch vụ Viettel cloud storage đầu tiên bạn cần cài đặt ** Flysystem** adapter thông qua [ Composer] ( https://getcomposer.org ) :
7
+
8
+ ``` php
9
+ composer require league/flysystem-aws-s3-v2
10
+ ```
11
+
12
+ ### Cấu hình
13
+
14
+ Sau khi cài đặt xong bạn hãy mở file ` config/filesystems.php ` để cấu hình Viettel trong mục ` disks ` :
15
+
16
+ ``` php
17
+ ....
18
+ 'disks' => [
19
+ ....
20
+ 'viettel' => [
21
+ 'driver' => 'viettel',
22
+ 'key' => 'Do Viettel IDC cấp',
23
+ 'secret' => 'Do Viettel IDC cấp',
24
+ 'bucket' => 'bucket của bạn'
25
+ ],
26
+ ]
27
+ ```
28
+
29
+ ### Sử dụng
30
+
31
+ Sau khi đã cài đặt và cấu hình, ngay bây giờ bạn đã có thể truy cập đến Viettel cloud storage thông qua ` Storage ` facade:
32
+
33
+ ``` php
34
+ use Storage;
35
+
36
+ Storage::disk('viettel')->put('file.txt', 'Contents');
37
+ ```
38
+
39
+ Cách sử dụng các phương thức giống với storage của Laravel bạn có thể kham khảo thêm các phương thức tại
40
+ [ đây] ( https://laravel.com/docs/master/filesystem ) .
41
+
42
+ Để tăng performance bạn có thể thiết lập cache cho Viettel disk như ` S3 Storage ` kham khảo cách thiết lập tại
43
+ [ đây] ( https://laravel.com/docs/master/filesystem#configuration ) .
You can’t perform that action at this time.
0 commit comments