Google calendar tile | laravel-dashboard | Spatie

 SPATIE

  Laravel Dashboard
====================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-dashboard](https://spatie.be/docs/laravel-dashboard/v4)  Adding-tiles  Google calendar tile

 Version   v4   v3   v2   v1

 Other versions for crawler [v4](https://spatie.be/docs/laravel-dashboard/v4) [v3](https://spatie.be/docs/laravel-dashboard/v3) [v2](https://spatie.be/docs/laravel-dashboard/v2) [v1](https://spatie.be/docs/laravel-dashboard/v1)

  Google calendar tile
- [ Introduction ](https://spatie.be/docs/laravel-dashboard/v4/introduction)
- [ Support us ](https://spatie.be/docs/laravel-dashboard/v4/support-us)
- [ Requirements ](https://spatie.be/docs/laravel-dashboard/v4/requirements)
- [ Installation &amp; setup ](https://spatie.be/docs/laravel-dashboard/v4/installation-setup)
- [ Upgrading ](https://spatie.be/docs/laravel-dashboard/v4/upgrading)
- [ Questions and issues ](https://spatie.be/docs/laravel-dashboard/v4/questions-issues)
- [ Changelog ](https://spatie.be/docs/laravel-dashboard/v4/changelog)
- [ About us ](https://spatie.be/docs/laravel-dashboard/v4/about-us)

Usage
-----

- [ Creating your first dashboard ](https://spatie.be/docs/laravel-dashboard/v4/basic-usage/creating-your-first-dashboard)
- [ Positioning tiles ](https://spatie.be/docs/laravel-dashboard/v4/basic-usage/positioning-tiles)
- [ Customizing the views ](https://spatie.be/docs/laravel-dashboard/v4/basic-usage/customizing-the-views)

Adding tiles
------------

- [ Overview ](https://spatie.be/docs/laravel-dashboard/v4/adding-tiles/overview)
- [ Creating your own tile ](https://spatie.be/docs/laravel-dashboard/v4/adding-tiles/creating-your-own-tile)
- [ Google calendar tile ](https://spatie.be/docs/laravel-dashboard/v4/adding-tiles/google-calendar)
- [ Time and Weather tile ](https://spatie.be/docs/laravel-dashboard/v4/adding-tiles/time-weather)
- [ Oh Dear Uptime tile ](https://spatie.be/docs/laravel-dashboard/v4/adding-tiles/oh-dear-uptime)
- [ Velo tile ](https://spatie.be/docs/laravel-dashboard/v4/adding-tiles/velo)
- [ Belgian trains tile ](https://spatie.be/docs/laravel-dashboard/v4/adding-tiles/belgian-trains)
- [ Attendances tile ](https://spatie.be/docs/laravel-dashboard/v4/adding-tiles/attendances)

 Google calendar tile
====================

###  On this page

1. [ Installation ](#content-installation)
2. [ Usage ](#content-usage)

This tile displays events on a Google calendar.

![screenshot](https://spatie.be/docs/laravel-dashboard/v4/images/calendar.png)

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

You can install the tile via composer:

```
composer require spatie/laravel-dashboard-calendar-tile
```

You must also [set up](https://github.com/spatie/laravel-google-calendar#installation) the `spatie/laravel-google-calendar` package. That package will fetch data for Google Calendar. Here are instructions that show how you can [obtain credentials to communicate with Google Calendar](https://github.com/spatie/laravel-google-calendar#how-to-obtain-the-credentials-to-communicate-with-google-calendar).

In the `dashboard` config file, you must add this configuration in the `tiles` key. The `ids` should contain any calendar id that you want to display on the dashboard.

```
// in config/dashboard.php

return [
    // ...
    'tiles' => [
        'calendar' => [
            'ids' => [
                env('GOOGLE_CALENDAR_ID'),
            ],
            'refresh_interval_in_seconds' => 60,
        ],
    ],
];
```

In `app\Console\Kernel.php` you should schedule the `Spatie\CalendarTile\FetchCalendarEventsCommand` to run. You can let in run every minute if you want. You could also run this less frequently if fast updates on the dashboard aren't that important for this tile.

```
// in app/console/Kernel.php

protected function schedule(Schedule $schedule)
{
    // ...
    $schedule->command(Spatie\CalendarTile\FetchCalendarEventsCommand::class)->everyMinute();
}
```

Usage
-----------------------------------------------------------------------

In your dashboard view you use the `livewire:calendar-tile` component. You should pass the calendar id for your calendar to the `calendar-id` property.

```

```

### Customizing the view

If you want to customize the view used to render this tile, run this command:

```
php artisan vendor:publish --provider="Spatie\CalendarTile\CalendarTileServiceProvider" --tag="dashboard-calendar-tile-views"
```

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
