Skip to content

Package: tags

Generated from api/packages/tags

Source: api/packages/tags · imported version 0.1.22. The sections after the README are extracted from the code on every docs build.

The lib allows tags

  • adding tags to each module
  • edit and create multiple tags

See Swagger documented endpoints.

Some tests can also be a great point of start.

To play the content you can use Ulams Tags

  1. composer require ulams/tags
  2. php artisan migrate

All the endpoints need to be accesible from other domains, so CORS must be properlly set.

Except of endpoints assets must expose CORS headers as well. You achive that by setting Apache/Nginx/Caddy/Whatever settings - below is example for Nginx for wildcard global access.

location ~* \.(eot|ttf|woff|woff2|jpg|jpeg|gif|png|wav|mp3|mp4|mov|ogg|webv)$ {
add_header Access-Control-Allow-Origin *;
}

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

  • php artisan tag-permissions:seed to add permissions
  • caching
  • casading delete
  • sql foreign keys indexing
  • clearup task - deleting temp files, marked for delete
Method Path Auth Action
GET /api/tags TagsAPIController@index
GET /api/tags/unique TagsAPIController@unique
POST /api/admin/tags yes TagsAPIController@create
DELETE /api/admin/tags yes TagsAPIController@destroy
GET /api/admin/tags/unique yes TagsAPIController@uniqueAdmin
GET /api/admin/tags/{tag} yes TagsAPIController@show
Permission Seeded for roles Constant
tags_create admin, tutor TagsPermissionsEnum::TAGS_CREATE
tags_delete admin, tutor TagsPermissionsEnum::TAGS_DELETE
tags_list admin, tutor TagsPermissionsEnum::TAGS_LIST
tags_update admin, tutor TagsPermissionsEnum::TAGS_UPDATE

Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).

None.

None.

None.

None.

None.