daothanh/taxonomy

Manage taxonomy

Installs: 154

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:asgard-module

1.0.6 2018-11-11 15:22 UTC

This package is not auto-updated.

Last update: 2021-10-19 05:34:23 UTC


README

Simple module that help you to manage your taxonomy (category)

Installation

Module Download

Using AsgardCMS's module download command:

php artisan asgard:download:module daothanh/taxonomy --migrations

This will download the module, run its migrations.

Composer

composer require daothanh/taxonomy
php artisan module:migrate Taxonomy

Add Routes

Go to reosources/assets/js/app.js

  • Import Routes: import TaxonomyRoutes from '../../../Modules/Taxonomy/Assets/js/TaxonomyRoutes';
  • Add TaxonomyRoutes to router: ...TaxonomyRoutes,
  • Build webpack by npm run dev

Add the category to form

To show the category box in your form . You must use the TermsBox (a vuejs component) or taxonomyChooseTerms directive (with blade)

TermsBox.vue

Example for page form:

<template>
<TermsBox vocabularyId="1" entity="Modules\Page\Entities\Page"/>
</template>
<script>
import TermsBox from '../../../../Taxonomy/Assets/js/components/TermsBox';`
export default {
        components: {TermsBox}
}
</script>