escolalms/stationary-events

Escola Headless LMS Stationary Events

0.1.11 2023-06-20 12:11 UTC

This package is auto-updated.

Last update: 2024-12-19 13:26:28 UTC


README

swagger codecov phpunit downloads downloads downloads Maintainability

What does it do

This package is used to manage stationary events.

Installing

  • composer require escolalms/stationary-events
  • php artisan migrate
  • php artisan db:seed --class="EscolaLms\StationaryEvents\Database\Seeders\StationaryEventPermissionSeeder"

Database

  1. stationary_events - main table, contains information about the event

  2. stationary_event_users - table to store assigned users

  3. stationary_event_authors - table to store assigned authors

  4. category_stationary_event - table to store assigned categories

StationaryEvent n -> n User (using pivot table StationaryEventUser)
StationaryEvent n -> n User (using pivot table StationaryEventAuthor)
StationaryEvent n -> n Category (using pivot table CategoryStationaryEvent)

Endpoints

All the endpoints are defined in swagger

Tests

Run ./vendor/bin/phpunit to run tests.

Test details codecov

Events

  1. StationaryEventAssigned - event dispatched after assigning user to stationary event
  2. StationaryEventUnassigned - event dispatched after detaching user form stationary event
  3. StationaryEventAuthorAssigned - event dispatched after assigning author to stationary event
  4. StationaryEventAuthorUnassigned - event dispatched after detaching author from stationary event

How to use this on frontend

Admin panel

List of stationary events List of stationary events

Stationary event form Form

Permissions

Permissions are defined in seeder