Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 935 Bytes

plugins.md

File metadata and controls

42 lines (30 loc) · 935 Bytes

Plugins

##Tribe Events Calendar

Controller

<?php

use Illuminate\Http\Request;

class EventsController extends Controller
{
    public function handle(Request $request)
    {
        if ($request->get('ical')) {

            $iCal = new \Tribe__Events__iCal;

            $iCal->generate_ical_feed(get_post(post()->ID));
        }

        if (is_single()) {
            return view('events');
        }

        return view('events');
    }

Use the following view, then you can customize the templates as needed.

    <div id="tribe-events-pg-template">
        @php(tribe_events_before_html())
        @php(tribe_get_view())
        @php(tribe_events_after_html())
    </div> <!-- #tribe-events-pg-template -->