lactobasilus / filesystem-onedrive-php8
wak waw
v0.0.1
2021-01-26 13:53 UTC
Requires
- php: >=7.1 || ^7.4 || ^8.0
- ext-json: *
- as247/flysystem-drive-support: ^1.0
- microsoft/microsoft-graph: dev-zengin/php-version
README
#disclamire ini merupakaan package orang yang saya sesuaikan dengan php 8. kalo buat pr lama di acc jadi mendingan buat paket sendiri
Installation
composer require lactobasilus/filesystem-onedrive-php8
Usage
- Follow Azure Docs to obtain your
ClientId, ClientSecret & TenantId
- Follow OneDrive Docs to obtain your
refreshToken
$token=new \As247\CloudStorages\Support\OneDriveOauth(); $token->setClientId('[Client ID]'); $token->setTenantId('[Tenant ID]'); $token->setClientSecret('[Client secret]'); $token->setRefreshToken('[Refresh token]'); $graph = new \Microsoft\Graph\Graph(); $graph->setAccessToken($token->getAccessToken()); $adapter = new \As247\Flysystem\OneDrive\OneDriveAdapter($graph, '[root path]'); $filesystem = new \League\Flysystem\Filesystem($adapter);