PHP code example of marcustansoon / spatie-calendar-links-adapter
1. Go to this page and download the library: Download marcustansoon/spatie-calendar-links-adapter library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
marcustansoon / spatie-calendar-links-adapter example snippets
composer
// Import script
on\SpatieCalendarLinksAdapter;
// Create calendar links
$calendarLinks = SpatieCalendarLinksAdapter::create(
(object)[
'from' => '2020-10-28 18:00',
'to' => '2020-10-28 21:40',
// List of supported timezones -> https://www.php.net/manual/en/timezones.php
'timezone' => 'America/Chihuahua',
'title' => "Elon Musk",
'description' => 'Elon Reeve Musk FRS is a business magnate, industrial designer, engineer, and philanthropist. He is the founder, CEO, CTO and chief designer of SpaceX; early investor, CEO and product architect of Tesla, Inc.<br>For more information, please visit our website <a href="https://en.wikipedia.org/wiki/Elon_Musk">here</a>.',
]
);
echo $calendarLinks->google; // https://calendar.google.com/calendar/render?action=TEMPLATE&dates=20200929...
echo $calendarLinks->ics; // data:text/calendar;charset=utf8;base64,QkVHSU46VkNBTEVOREFS...
echo $calendarLinks->yahoo; // https://calendar.yahoo.com/?v=60&view=d&type=20&st=202009...
echo $calendarLinks->webOutlook; // https://outlook.live.com/calendar/deeplink/compose?path=/calendar/action/compos...