shanjiechen / voyager-taxonomy
The taxonomy extension for voyager was inspired by drupal-taxonom.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 0
Language:HTML
Requires
- kalnoy/nestedset: ^4.3
- maatwebsite/excel: ^3.1
- tcg/voyager: ^1.1
This package is auto-updated.
Last update: 2024-03-04 19:51:09 UTC
README
voyager-taxonomy | 中文版
The Taxonomy manager and taxonomy custom field for laravel voyager.It can easily help you create and use categories. Based mainly on the nestedset. It has vocabulary and terms manager. And it used ztree.js, to create a treeview for crud taxonomy terms and can order terms by drap&drop.
use
I don't recommend using it in a production environment. But I has use it in myself project. If u have ability to develop, You can try it out and welcome to the development.
composer require shanjiechen/voyager-taxonomy
php artisan voyager-taxonomy:install
, this will create two tablestaxonomy-vocabularies
andtaxonomy-terms
php artisan vendor:publish
, PublishShanjieChen\VoyagerTaxonomy\VoyagerTaxonomyServiceProvider
, this will publish voyager-taxonomy assets.- To your voyager backend create BREAD of data tables
taxonomy-vocabularies
andtaxonomy-terms
, options like below:- taxonomy_vocabularies Model Name:
ShanjieChen\VoyagerTaxonomy\Models\TaxonomyVocabulary
- taxonomy_vocabularies Controller Name:
\ShanjieChen\VoyagerTaxonomy\Http\Controllers\TaxonomyVocabularyController
- taxonomy_terms Model Name:
ShanjieChen\VoyagerTaxonomy\Models\TaxonomyTerm
this will create menu automatic, remove taxonomy-terms menu, we will not use this.
- taxonomy_vocabularies Model Name:
In the future I'll call it seeders and write it into the installation command
- Register the routs of taxonomy in their routes file, for example:
Route::group(['prefix' => 'admin(or your custom voyager prefix)'], function () {
Voyager::routes();
\ShanjieChen\VoyagerTaxonomy\Facades\VoyagerTaxonomy::routes();
});
Try use it. Browse /admin (or your custom voyager prefix) /taxonomy-vocabularies