PHPackages                             pgbrown/spatie-calendar-links-php56 - 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. pgbrown/spatie-calendar-links-php56

ActiveLibrary

pgbrown/spatie-calendar-links-php56
===================================

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

017PHPCI failing

Since May 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/pgbrown/spatie-calendar-links-php56)[ Packagist](https://packagist.org/packages/pgbrown/spatie-calendar-links-php56)[ RSS](/packages/pgbrown-spatie-calendar-links-php56/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)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)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fa8b57daf1e7393788a39b25dedabec0f09f2246bb1d7ffddb9016cc395124c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f63616c656e6461722d6c696e6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/calendar-links)[![Build Status](https://camo.githubusercontent.com/00e91e6f6e669ffc5db622d34cd40657a732f731a5d10cedb5e327173addfe04/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7370617469652f63616c656e6461722d6c696e6b732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/spatie/calendar-links)[![SensioLabsInsight](https://camo.githubusercontent.com/2a437efa57e090fdbe968cd3b46e3e4c695d74b8a1076ed7f22329ed6bdf6e80/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f34326538353836622d303233342d343839312d616431362d3338346263333166343763642e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/42e8586b-0234-4891-ad16-384bc31f47cd)[![Quality Score](https://camo.githubusercontent.com/696d893d6cb116a9779dc8c1151ccc66e48c68be3a1ea44bdccde7a5c225ce70/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7370617469652f63616c656e6461722d6c696e6b732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/spatie/calendar-links)[![StyleCI](https://camo.githubusercontent.com/5446c998c6e5c6247217d03f52cd97d298d394b25a2922501d66ce5e01c9a2f1/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130333633383038302f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/103638080)[![Total Downloads](https://camo.githubusercontent.com/e9e0eb6ba22835faa77d8a75caf9fde7a78fdbce884dd83551b43ad9470e15db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f63616c656e6461722d6c696e6b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/calendar-links)

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 spatie/calendar-links
```

Usage
-----

[](#usage)

```
