Categories

Categories help you organize your blog posts into groups (e.g. Laravel, News, Tutorials). They use the spatie/laravel-tags package and support translations so each language can have its own name.

When creating a new post, create the post first, then assign categories to it.

Creating & Editing Categories

You can create and edit categories from the ManageCategories modal.

  • Create a new category by filling in at least the English name and clicking Save.
  • Edit existing categories – simply select one from the list, adjust the translations and save.
  • Delete a category (only if it is no longer needed). Deleting will also remove the relationship from all posts.

Deleting a category will also remove that category and all its translations from all posts.

Assigning and Unassigning Categories to a Post

  • You can easily assign categories to a post by using the Categories multiselect field.
  • When you assign or unassign a category, the changes are saved automatically.

Translations

Each category can have a name for each available language (configured in config/languages.php). By default, when you create a new category, it will have the same English name in all languages. You can edit the translations later.

When editing a post, category names will be displayed in the post's language (if that translation exists for the category).

Read Next