PHP code example of chrishardie / laravel-calendar-crawler

1. Go to this page and download the library: Download chrishardie/laravel-calendar-crawler 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/ */

    

chrishardie / laravel-calendar-crawler example snippets


return [
    'default_update_frequency' => 720, // Refresh every 12 hours

    'calendar_name' => 'Calendar of Events',

    'calendar_description' => 'A calendar of events from various sources.',

    // Default URL of calendar ICS feed
    'stream_url' => '/calendar/calendar.ics',

    // Source-specific authentication information
    'auth' => [
        'google' => [
            'api_key' => env('GOOGLE_CAL_API_KEY'),
        ]
    ],
];

Route::calendarstream();

        DB::table('calendar_sources')->insert([
            'name' => 'Your Local Government',
            'type' => 'GoogleCalendar',
            'home_url' => 'https://www.government.gov/',
            'location' => '[email protected]',
        ]);

        DB::table('calendar_sources')->insert([
            'name' => 'Cool Nonprofit Organization',
            'type' => 'FacebookPage',
            'home_url' => 'https://www.facebook.com/orgname/',
            'location' => '12345678',
        ]);


Schema::dropIfExists('calendar_sources');
Schema::dropIfExists('events');
bash
php artisan vendor:publish --provider="ChrisHardie\CalendarCrawler\CalendarCrawlerServiceProvider" --tag="calendar-crawler-migrations"
php artisan migrate
bash
php artisan vendor:publish --provider="ChrisHardie\CalendarCrawler\CalendarCrawlerServiceProvider" --tag="calendar-crawler-config"