2017 © Pedro Peláez
 

library laravel5calendar

A calendar with event managment package for laravel 5 using Carbon and Blade templating

image

arkhas/laravel5calendar

A calendar with event managment package for laravel 5 using Carbon and Blade templating

  • Thursday, November 30, 2017
  • by Arkhas
  • Repository
  • 1 Watchers
  • 12 Stars
  • 661 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 11 Versions
  • 2 % Grown

The README.md

Installation

Install the package through Composer :, (*1)

composer require arkhas/laravel5calendar

Now all you have to do is add the service provider of the package and alias the package. To do this open your app/config/app.php file., (*2)

Add a new line to the service providers array:, (*3)

Arkhas\Calendar\CalendarServiceProvider::class,

Add a new line to the aliases array:, (*4)

'Calendar' => Arkhas\Calendar\Facades\Calendar::class,

Then insert this in the top of your file :, (*5)

use Calendar;

Or use it directly :, (*6)

$calendar = \Calendar::generate();

Now you're ready to start using the calendar package in your application., (*7)

Usage

You can use the generate method to generate a calendar, it will return the template of the calendar., (*8)

// 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);

For using it in you view, simply use :, (*9)

{!! $calendar !!}

Routing

By default, the routing format is /calendar/YYYY/MM , you can change the leading route using the url data parameter :, (*10)

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

Template

If you want to use a custom template, run :, (*11)

php artisan vendor:publish

The template is located in resources/views/vendor/calendar/calendar.blade.php, (*12)

The css file is located in public/assets/arkhas/calendar/calendar.css, (*13)

Add this to your template, (*14)




Navigate through the calendar with links using the calendarButton Class. The ajax script will replace the calendar class by an updated calendar., (*15)

For more information about how it work, you can navigate to /arkhas/demo and see the template in ressources/views/vendor/calendar/demo.blade.php, (*16)

The Versions

30/11 2017

dev-master

9999999-dev

A calendar with event managment package for laravel 5 using Carbon and Blade templating

  Sources   Download

MIT

The Development Requires

by Avatar Arkhas

30/11 2017

v1.0.7

1.0.7.0

A calendar with event managment package for laravel 5 using Carbon and Blade templating

  Sources   Download

MIT

The Development Requires

by Avatar Arkhas

29/11 2017

dev-laravel-5.4

dev-laravel-5.4

A calendar with event managment package for laravel 5 using Carbon and Blade templating

  Sources   Download

MIT

The Development Requires

by Avatar Arkhas

28/09 2017

dev-analysis-qry3lg

dev-analysis-qry3lg

A calendar with event managment package for laravel 5 using Carbon and Blade templating

  Sources   Download

MIT

The Development Requires

by Avatar Arkhas

25/09 2017

v1.0.6

1.0.6.0

A calendar with event managment package for laravel 5 using Carbon and Blade templating

  Sources   Download

MIT

The Development Requires

by Avatar Arkhas

20/05 2016

v1.0.5

1.0.5.0

A calendar with event managment package for laravel 5 using Carbon and Blade templating

  Sources   Download

MIT

by Avatar Arkhas

18/05 2016

v1.0.4

1.0.4.0

A calendar with event managment package for laravel 5 using Carbon and Blade templating

  Sources   Download

MIT

by Avatar Arkhas

17/05 2016

v1.0.3

1.0.3.0

A calendar package for laravel 5 using Carbon and Blade templating

  Sources   Download

MIT

by Avatar Arkhas

17/05 2016

v1.0.2

1.0.2.0

A calendar package for laravel 5 using Carbon and Blade templating

  Sources   Download

MIT

by Avatar Arkhas

17/05 2016

v1.0.1

1.0.1.0

A calendar package for laravel 5 using Carbon and Blade templating

  Sources   Download

MIT

by Avatar Arkhas

17/05 2016

v1.0.0

1.0.0.0

A calendar package for laravel 5 using Carbon and Blade templating

  Sources   Download

MIT

by Avatar Arkhas