Reputation: 11
I want step by step explaination on how to Send a calendar invite through mail using php.
I have refer 2nd answer of this link given below. send invitation using google calendar API in php but couldn't understand the code. Please explain in brief.
Upvotes: 1
Views: 3588
Reputation: 11636
Use the package spatie/laravel-google-calendar
, a popular package to manage events on a Google Calendar.
Example:
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();
$event->addAttendee(['email' => '[email protected]']);
$event->addAttendee(['email' => '[email protected]']);
$event->save();
Refer the readme for detailed installation instructions.
Link: https://github.com/spatie/laravel-google-calendar
Upvotes: 1