Easily interact with Google Calendar from PHP with spatie/laravel-google-calendar

Great new package by spatie:

use Spatie\GoogleCalendar\Event;

//create a new event
$event = new Event;

$event->name = 'A new event';
$event->startDateTime = Carbon\Carbon::now();
$event->endDateTime = Carbon\Carbon::now()->addHour();


// get all future events on a calendar
$events = Event::get(); 

$firstEvent = $events->first();
$firstEvent->name = 'updated name';

// create a new event
   'name' => 'A new event'
   'startDateTime' => Carbon\Carbon::now(),
   'endDateTime' => Carbon\Carbon::now()->addHour(),

// delete an event

Do note that you need to set up a service account for your calendar before you can access it.

Manage events on a Google Calendar →