Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
src
tests cache clear Jun 24, 2018
.gitignore laravel-google-photos May 12, 2018
.styleci.yml
.travis.yml
LICENSE
README.md
composer.json service May 22, 2018
phpunit.xml

README.md

Google Photos API for Laravel

Build Status

https://developers.google.com/photos/

Requirements

  • PHP >= 7.0
  • Laravel >= 5.5

Installation

composer require revolution/laravel-google-photos

This package depends on

Google_Service_PhotosLibrary
https://github.com/google/google-api-php-client-services/tree/master/src/Google/Service/PhotosLibrary

Get API Credentials

from https://developers.google.com/console
Enable Photos Library API, People API and Google+ API.

publish config file

php artisan vendor:publish --provider="PulkitJalan\Google\GoogleServiceProvider" --tag="config"

config/google.php

    '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

config/service.php for Socialite

    'google' => [
        'client_id'     => env('GOOGLE_CLIENT_ID', ''),
        'client_secret' => env('GOOGLE_CLIENT_SECRET', ''),
        'redirect'      => env('GOOGLE_REDIRECT', ''),
    ],

Configure .env as needed

GOOGLE_APPLICATION_NAME=

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT=

Demo

https://github.com/kawax/laravel-google-photos-project

Usage

See demo project and docs.

LICENSE

MIT
Copyright kawax