https://developers.google.com/photos/
- PHP >= 7.1.3
- Laravel >= 5.8
composer require revolution/laravel-google-photos
This package depends on
- Socialite
- https://github.com/google/google-api-php-client
- https://github.com/pulkitjalan/google-apiclient
Google_Service_PhotosLibrary
https://github.com/google/google-api-php-client-services/tree/master/src/Google/Service/PhotosLibrary
from https://developers.google.com/console
Enable Photos Library API
.
php artisan vendor:publish --provider="PulkitJalan\Google\GoogleServiceProvider" --tag="config"
'client_id' => env('GOOGLE_CLIENT_ID', ''),
'client_secret' => env('GOOGLE_CLIENT_SECRET', ''),
'redirect_uri' => env('GOOGLE_REDIRECT', ''),
'scopes' => [\Google_Service_PhotosLibrary::PHOTOSLIBRARY],
'access_type' => 'offline',
'approval_prompt' => 'force',
'prompt' => 'consent', //"none", "consent", "select_account" default:none
Google Photos API does not support Service Account.
'google' => [
'client_id' => env('GOOGLE_CLIENT_ID', ''),
'client_secret' => env('GOOGLE_CLIENT_SECRET', ''),
'redirect' => env('GOOGLE_REDIRECT', ''),
],
GOOGLE_APPLICATION_NAME=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT=
https://github.com/kawax/laravel-google-photos-project
See demo project and docs.
Or another Google API Series.
- https://github.com/kawax/laravel-google-sheets
- https://github.com/kawax/laravel-google-searchconsole
MIT
Copyright kawax