Azure Blob Storage and Azure Cognitive using Yii2
This web is sample how to use Azure Blob Storage using Yii2 PHP Framework and was published here to fulfill the submission on Dicoding MACD. Please use this app for studying only.
Install Required Vendors
Make sure you have PHP and composer installed on your machine, to Install required Vendors run this command:
composer install
OR
php composer.phar install
CONFIGURATIONS
Azure Blob Storage
To configure Azure Blob Storage, open config/params.php
and fill up with your Azure credential
<?php
return [
'adminEmail' => 'admin@example.com',
'azureStorageAccountName' => '<your account name>',
'azureStorageAccountKey' => '<your key>',
'azureStorageContainerName' => '<your container>',
];
You can change azureStorageContainerName
later like this:
$azure = new AzureClient();
$azure->containerName = 'abc123';
Azure Cognitive
To configure Azure Cognitive, open config/params.php
and put your Azure Cognitive Key:
'azureCognitiveKey' => '<your Azure Cognitive key>'
Run The App
To run the app, execute command on your root directory:
On Unix
./yii serve
On Windows
yii serve