Simple module that help you to manage your taxonomy (category)
Using AsgardCMS's module download command:
php artisan asgard:download:module daothanh/taxonomy --migrations
This will download the module, run its migrations.
composer require daothanh/taxonomy
php artisan module:migrate Taxonomy
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
To show the category box in your form . You must use the TermsBox (a vuejs component) or taxonomyChooseTerms directive (with blade)
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>