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

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