PHP code example of arkhas / laravel5calendar

1. Go to this page and download the library: Download arkhas/laravel5calendar 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/ */

    

arkhas / laravel5calendar example snippets


use Calendar;

$calendar = \Calendar::generate();

// Generate a calendar for the current month and year
$calendar = Calendar::generate();

// Generate a calendar for the specified year and month
$calendar = Calendar::generate(2012, 5);

// Add an array of events as the third parameter to add them to the calendar (YYYY/MM/DD), 
$events = array(
	'2016/5/3',
	'2016/5/5',
	'2016/5/11',
	'2016/5/16',
	'2016/5/28',
);

$calendar = Calendar::generate(2016, 5, $events);

// Add an array of data as the fourth parameter so you can use them in the view :

$data = array(
	'name' => 'Arkhas',
	'url'  =>  '/event/arkhas',
	'foo' => 'bar'
);

$calendar = Calendar::generate(2016, 5, $events, $data);

{!! $calendar !!}

$data['url'] = '/foo/bar/';