Laravel Forum 4.x Documentation

API - Categories

Categories

Index

GET <root>/api/category

Returns a collection of categories, optionally narrowed down by request scopes.

Store

POST <root>/api/category

Creates a category with the given attributes. Valid attributes are:

NameTypeDescriptionDefault
category_idIntegerParent category ID0
titleString (required)Category titleN/A
descriptionStringCategory descriptionN/A
weightInteger (required)Category listing weightN/A
enable_threadsBoolean (required)Enable/disable threadsN/A
privateBoolean (required)Make private or publicN/A

Fetch

GET <root>/api/category/<id>

Returns a specified category.

Delete

DELETE <root>/api/category/<id>

Deletes a specified category.

Enable Threads

PATCH <root>/api/category/<id>/enable-threads

Enables threads on a specified category (if applicable).

Disable Threads

PATCH <root>/api/category/<id>/disable-threads

Disables threads on a specified category (if applicable).

Make Public

PATCH <root>/api/category/<id>/make-public

Makes the specified category public.

Make Private

PATCH <root>/api/category/<id>/make-private

Makes the specified category private.

Move

PATCH <root>/api/category/<id>/move

Gives the specified category a new category_id (if applicable).

Rename

PATCH <root>/api/category/<id>/rename

Gives the specified category a new title.

Reorder

PATCH <root>/api/category/<id>/reorder

Gives the specified category a new weight.