yuyinitos/laravel5-google-calendar

Google Calendar REST API for Laravel 5
13 2
Install
composer require yuyinitos/laravel5-google-calendar
PHP:>=5.5.9
License:MIT
Last Updated:Apr 14, 2016
Links: GitHub  ·  Packagist
Maintainer: yuyinitos

Laravel5-Google-Calendar

A simple integration of Laravel 5 (or any PHP) and Google Calendar REST API

Used in the Laravel Bill Reminder app I created: https://github.com/Askedio/BillReminder

Overview

I needed access to Google Calendar and their PHP SDK failed for me on to many levels. I am perfectly happy using REST APIS and decided to go that route.

This package needs better authentication checks, error checks and unit testing.

Usage

Declare use statements to access Calendar and CalendarEvent.

  use Askedio\Laravel5GoogleCalendar\Calendar;
  use Askedio\Laravel5GoogleCalendar\Events as CalendarEvent;

Event Options

  CalendarEvent::createEvents([]);
  CalendarEvent::readEvents($eventId=false); # false to read all events in time frame
  CalendarEvent::updateEvents($eventId, []);
  CalendarEvent::deleteEvents($eventId);

Calendar Options

  Calendar::createCalendar([]);
  Calendar::readCalendar();
  Calendar::updateCalendar([]);
  Calendar::deleteCalendar();

Class Options

Set the calendar to an empty value when using readCalendar to get a list of calendars.

  # Change calendar
  Calendar::setVar('calendar', 'primary');

  # Change start/end time
  Calendar::setVar('start', 'yesterday');
  Calendar::setVar('end', 'today');

Creating & Updating

Creating sends a POST request with the array provided. Updating sents a PATCH request with the array provided.

Check the Google Calendar API documentation for the values to be provided. You can also view mine here: https://github.com/Askedio/BillReminder/blob/master/src/app/Helpers/BillReminder.php

Related Packages

reliese/laravel

Reliese Components for Laravel Framework code generation.

3,924,784 1,705
php-tmdb/laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the...

53,312 161
laravel-ja/laravel

The Laravel Framework.

5,667 17
kavenegar/laravel

laravel 4 and 5 kavenegar integration

363,860 86
laravel/laravel

The skeleton application for the Laravel framework.

64,565,571 84,921