PHPackages                             osmankh/calendar-links - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. osmankh/calendar-links

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

osmankh/calendar-links
======================

Generate add to calendar links for Google, iCal and other calendar systems

1.3.1(6y ago)015MITPHPPHP ^7.0

Since Sep 17Pushed 6y agoCompare

[ Source](https://github.com/osmankh/calendar-links)[ Packagist](https://packagist.org/packages/osmankh/calendar-links)[ Docs](https://github.com/osmankh/calendar-links)[ RSS](/packages/osmankh-calendar-links/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (25)Used By (0)

Generate add to calendar links for Google, iCal and other calendar systems
==========================================================================

[](#generate-add-to-calendar-links-for-google-ical-and-other-calendar-systems)

This repo is forked from Spatie/calendar-links repo and modified to fit my needs.

Using this package you can generate links to add events to calendar systems. Here's a quick example:

```
(new Link(
   'Birthday',
   DateTime::createFromFormat('Y-m-d H:i', '2018-02-01 09:00'),
   DateTime::createFromFormat('Y-m-d H:i', '2018-02-01 18:00')
))->google();
```

This will output: `https://calendar.google.com/calendar/render?action=TEMPLATE&text=Birthday&dates=20180201T090000/20180201T180000&sprop=&sprop=name:`

If you follow that link (and are authenticated with Google) you'll see a screen to add the event to your calendar.

The package can also generate ics files that you can open in several email and calendar programs, including Microsoft Outlook, Google Calendar, and Apple Calendar.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require osmankh/calendar-links
```

Usage
-----

[](#usage)

```
