Download the PHP package jaredclemence/laravel_google_calendar_api without Composer
On this page you can find all versions of the php package jaredclemence/laravel_google_calendar_api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jaredclemence/laravel_google_calendar_api
More information about jaredclemence/laravel_google_calendar_api
Files in jaredclemence/laravel_google_calendar_api
Package laravel_google_calendar_api
Short Description This is a plugin for laravel 5 projects to simplify the google calendar api.
License MIT
Informations about the package laravel_google_calendar_api
= Google Calendar Api for Laravel =
== Installing ==
Use composer to include this in your laravel package. From the base directory of your laravel 5 program, use the following command:
composer require jaredclemence/laravel_google_calendar_api
== Use ==
This package uses the namespace JRC\Google\Calendar. All classes will be in this namespace.
Prior to using this package,
- Register your application with Google
- Create an OAuth 2.0 credential for your application
- Download your application credentials as a json file and put a relative path reference to your json file in your .env file (This service will tell you the appropriate name of the env variable name in an exception, so just put it anywhere for now, and then change the variable name after you receive the error.)
=== Obtain an Auth Code ===
After including the composer autoloader, you will be able reference the CalendarAuthController.
Start by instantiating an instance of this class. Call the method getAuthUrl()
to generate
a redirect URL for your program. You will receive errors indicating which fields need to be set in
your .env file.
Send the user to that URL by passing back a redirect( $url )
value from your controller method.
For example:
Let us assume that we have set up the following route:
Route::get( '/google/auth', 'MyController@redirectUser' );
Then in our controller, we will have the following method:
class MyController extends Controller{
...
public function redirectUser(){
$authController = new JRC\Google\Calendar\CalendarAuthController();
$uri = $authController->getAuthUrl();
return redirect( $uri );
}
...
}
This will pass your user to the Google Auth view, where your user will grant your application permissions.
Google will call your program back at the URI you specify in your application's registration. (Don't worry if you picked a bad URI, you can always update this in your Google account and download a new JSON file.)
Further edits are being made to this file
All versions of laravel_google_calendar_api with dependencies
fideloper/proxy Version ^4.0
google/apiclient Version ^2.2
laravel/framework Version 5.6.*
laravel/tinker Version ^1.0