Skip to content

davide-casiraghi/laravel-events-calendar

Repository files navigation

Laravel Events Calendar

Latest Version on Packagist Build Status Quality Score Coverage Status GitHub last commit

Create and manage calendar events in your Laravel application.
For each event can be selected: a venue, one or more teachers, one or more organizers.

Installation

You can install the package via composer:

composer require davide-casiraghi/laravel-events-calendar

Publish all the vendor files

php artisan vendor:publish --force

Run the database migrations

php artisan migrate

Run the database seeders

php artisan db:seed --class=ContinentsTableSeeder
php artisan db:seed --class=CountriesTableSeeder
php artisan db:seed --class=EventCategoriesTableSeeder

Import the scss files

Add this line to your resources/sass/app.scss file:
@import 'vendor/laravel-events-calendar/emptyPages';
and then run in console:
npm run dev

Import the js files

Run in the command line:
npm i jquery-validation
npm i bootstrap-select
npm i bootstrap-timepicker

Add this line to your resources/js/app.js file:

import 'bootstrap-datepicker';
import 'tooltip.js';
import '@fancyapps/fancybox';
import 'jquery-validation';
import 'bootstrap-select';
import 'bootstrap-timepicker';

Usage

Authorization

To work the package aspect that in your user model and table you have a field called group that can have this possible values:

  • null: Registered user
  • 1: Super Admin
  • 2: Admin

Just the users that have Admin and Super admin privileges can access to the routes that allow to create, edit and delete the blogs, categories and posts. Otherwise you get redirected to the homepage.

Access to the package

After the package is published this new routes will be available:

  • /eventCategories
  • /events
  • /eventVenues
  • /teachers
  • /organizers
  • /continents
  • /continents

Accessing to this routes you can manage new events, teachers, organizers, venues.

Testing

You can run unit tests checking the code coverage using this command.

./vendor/bin/phpunit --coverage-html=html   

So you can find the reports about the code coverage in this file /html/index.html

Since there are more that 100 tests in place you can run specific tests using commands such as:
./vendor/bin/phpunit tests/TeacherControllerTest.php
or
./vendor/bin/phpunit --filter it_gets_the_event_repetitions EventControllerTest tests/EventControllerTest.php

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email davide.casiraghi@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.