uncgits/google-api-wrapper-laravel

Laravel Wrapper for Google API PHP Library


Keywords
php, api, google, laravel, uncg, uncgits

Documentation

google-api-wrapper-laravel

Google API Library (PHP) for use at UNCG

Google API Library - Laravel Wrapper

Contact: kevin.mcclain@uncg.edu

Introduction

This package is a Laravel wrapper for the UNCG Google API PHP Library package, so that the Google API PHP Library can be used in Laravel apps.

This is a work in progress. Not recommend for production apps just yet.


Installation

  1. composer require 'uncgits/google-api-wrapper-laravel'
  2. IF running Laravel 5.4 or below: Add Uncgits\GoogleApiLaravel\ServiceProvider::class, to your config/app.php file
  3. Run php artisan vendor:publish --provider='Uncgits\GoogleApiLaravel\ServiceProvider' - to publish the google-api.php config file
  4. Set your environment credentials in your .env file, and set your configuration options in config/google-api.php

GOOGLE_APPLICATION_CREDENTIALS= relative path to your google credentials .json

GOOGLE_DOMAIN = the domain

GOOGLE_ADMIN_ACCOUNT = account with admin rights

Dependencies

This package has dependencies on uncgits/google-api-php-library, standaniels/flash, and barryvdh/laravel-debugbar (dev)


Usage

Basic Usage / Getting Started

In your code, assuming you've set your information/credentials properly in your .env file, you should be able to instantiate the Uncgits\GoogleApiLaravel\GoogleApi class, and then use any of its available methods (inherited from uncgits/google-api-php-libary) to make an API call.


Version History

0.1

Initial release