From 0130d24dffd8add7a60248bb3765f4d516eb4334 Mon Sep 17 00:00:00 2001 From: "brecht.vermeersch" Date: Thu, 14 Nov 2024 16:17:41 +0100 Subject: [PATCH] add quickstart --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 6925d44..b172da5 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,22 @@ composer require azure-oss/storage-blob-flysystem ``` +## Quickstart + +```php +use AzureOss\FlysystemAzureBlobStorage\AzureBlobStorageAdapter; +use AzureOss\Storage\Blob\BlobServiceClient; +use League\Flysystem\Filesystem; + +$blobServiceClient = BlobServiceClient::fromConnectionString(''); +$containerClient = $blobServiceClient->getContainerClient('quickstart'); + +$adapter = new AzureBlobStorageAdapter($containerClient, "optional/prefix"); +$filesystem = new Filesystem($adapter); + +$filesystem->write('hello', 'world!'); +``` + ## Documentation For more information visit the documentation at [azure-oss.github.io](https://azure-oss.github.io/storage/flysystem/).