Download the PHP package revolution/laravel-google-photos without Composer
On this page you can find all versions of the php package revolution/laravel-google-photos. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download revolution/laravel-google-photos
More information about revolution/laravel-google-photos
Files in revolution/laravel-google-photos
Package laravel-google-photos
Short Description Google Photos API for Laravel
License MIT
Informations about the package laravel-google-photos
Google Photos API for Laravel
https://developers.google.com/photos/
Requirements
- PHP >= 8.2
- Laravel >= 11.0
Versioning
- Basic : semver
- Drop old PHP or Laravel version :
+0.1
. composer should handle it well. - Support only latest major version (
master
branch), but you can PR to old branches.
Installation
Get API Credentials
from https://developers.google.com/console
- Enable
Photos Library API
andGoogle Photos Picker API
. Be careful not to select Google Picker API as it is different from the Photos Picker API. - Create OAuth2.0 client id.
config/google.php
Currently, you can only access files uploaded via the API.
'access_type' => 'offline'
is required to obtain a refresh token.
Google Photos API does not support Service Account.
config/service.php for Socialite
.env
Usage example
Currently, Google Photos Library API only allows access to files uploaded via API, so it is difficult to use it freely.
Using it with someone else's account requires review.
It is still possible to upload one-way, so it is best to only use the upload function to your own account.
- Enable the Photos Library API in the Google console and add yourself as a test user.
- Get
refresh_token
by Socialite. Save it in the users table. - Upload the photo.
PhotosLibraryClient
This package depends on google/photos-library
and automatically delegates to the methods on PhotosLibraryClient.
- https://github.com/google/php-photoslibrary/blob/main/src/Google/Photos/Library/V1/PhotosLibraryClient.php
- https://github.com/google/php-photoslibrary/blob/main/src/Google/Photos/Library/V1/Gapic/PhotosLibraryGapicClient.php
PagedListResponse
listMediaItems()
and listAlbums()
return a PagedListResponse
, which is basically used with foreach.
Create new album
PhotosLibraryResourceFactory
has various creation methods.
Picker
Picker API
LICENSE
MIT
All versions of laravel-google-photos with dependencies
illuminate/support Version ^11.0
revolution/laravel-google-sheets Version ^7.0
google/photos-library Version ^1.7