escolalms/categories

Escola Headless LMS Categories

Maintainers

👁 qunabu
👁 mwl91

Package info

github.com/EscolaLMS/Categories

Type:package

pkg:composer/escolalms/categories

Statistics

Installs: 239 621

Dependents: 10

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.43 2024-02-21 12:20 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 7dd4de422ced768be3f34f58a3cc00554dc9cd92

  • Marcin Lenkowski <marcin.lenkowski.woop@escola.pl>

README

👁 swagger
👁 codecov
👁 phpunit
👁 downloads
👁 downloads
👁 downloads
👁 Maintainability

What does it do

This package is used for creating Categories for EscolaLms.

Installing

  • composer require escolalms/categories
  • php artisan migrate
  • php artisan db:seed --class="EscolaLms\Consultations\Database\Seeders\ConsultationsPermissionSeeder"

Endpoints

All the endpoints are defined in 👁 swagger

Tests

Run ./vendor/bin/phpunit --filter 'EscolaLms\\Categories\\Tests' to run tests. See tests folder as it's quite good staring point as documentation appendix.

Admin panel

Left menu

👁 Menu

List of consultations

👁 List of categories

Creating/editing consultation

👁 Creating or editing category

Permissions

Permissions are defined in seeder

Features

The lib allows categories

  • adding a category
  • generate slug for category
  • edit category
  • delete category
  • show list categories
  • if you want to remove category which has sub categories, earlier delete sub categories

To play the content you can use EscolaLMS Categories

Seeder

You can seed library and content with build-in seeders that are accessible with

  • php artisan category-permissions:seed to add permissions
  • php artisan db:seed --class="\EscolaLms\Categories\Database\Seeders\CategoriesSeeder"
  1. Parent Category is related belong to with other category
  2. Children Category is related has many with other categories
  3. Courses Category belongs to many with models Course
  4. Users Category is related belongs to many with User
Category 1 -> 1 Category (Parent)
Category 1 -> n Category (Children)
Category 1 -> n Course
Category 1 -> n Users