Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2cba60d

Browse files
Added Viettel doc.
1 parent 0d43598 commit 2cba60d

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
2020

2121
Các dịch vụ lưu trữ đang được hổ trợ:
2222

23-
+ **[Viettel](https://viettelidc.com.vn)**
23+
+ **[Viettel Cloud Storage](https://viettelidc.com.vn/cloud-storage)**
2424

2525

2626
## Cài đặt

‎docs/Viettel.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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).

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /