To install latest version of Laravel please type below command in your terminal
laravel new YOUR_PROJECT_NAME
Or you can setup demo project locally
git clone git@github.com:jd-patel/laravel-google-drive-s3.git
Add this command in your composer.json and update composer through terminal
"nao-pon/flysystem-google-drive": "~1.1"
Add GoogleDriveAdapter and GoogleDriveServiceProvider into "app/providers"
Add App\Providers\GoogleDriveServiceProvider::class, in "config/app.php"
Add disk "google" into "config/filesystems.php"
'disks' => [
'google' => [
'driver' => 'google',
'clientId' => env('GOOGLE_DRIVE_CLIENT_ID'),
'clientSecret' => env('GOOGLE_DRIVE_CLIENT_SECRET'),
'refreshToken' => env('GOOGLE_DRIVE_REFRESH_TOKEN'),
'folderId' => env('GOOGLE_DRIVE_ROOT_FOLDER_ID'),
],
],
For more details on how you can get your own Google Drive Keys please refer below links:
- Get your Google Drive Client ID and Secret
- Get your Google Drive Refresh Token
- Get your Google Drive Root Folder ID
Please add the keys you have created to .env file as below:
GOOGLE_DRIVE_CLIENT_ID=YOUR_GOOGLE_DRIVE_CLIENT_ID
GOOGLE_DRIVE_CLIENT_SECRET=YOUR_GOOGLE_DRIVE_CLIENT_SECRET
GOOGLE_DRIVE_REFRESH_TOKEN=YOUR_GOOGLE_DRIVE_REFRESH_TOKEN
GOOGLE_DRIVE_ROOT_FOLDER_ID=YOUR_GOOGLE_DRIVE_ROOT_FOLDER_ID