daothanh/taxonomy

Manage taxonomy

Installs: 167

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 auto-updated.

Last update: 2024-03-18 07:28:09 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>