myerscode/laravel-taxonomies
Composer 安装命令:
composer require myerscode/laravel-taxonomies
包简介
A package for creating taxonomies and terms to categorise Eloquent models
README 文档
README
A package for creating taxonomies and terms to categorise Eloquent models
Why is this package helpful?
This package allow you to create taxonomies and terms and relate them to Laravel models, similar to WordPress
- Create Taxonomy groups to categorise your models
- Add terms to models and to taxonomies
- Use your localisation files to translate taxonomy and term names
- Find all models relating to a given taxonomy or term
Unlike other popular tag packages for Laravel this one supports MariaDB.
Requirements
- PHP ^8.5
- Laravel ^13.0
Install
You can install this package via composer:
composer require myerscode/laravel-taxonomies
Setup
The service provider will automatically be registered via package discovery.
Publish the migration with:
php artisan vendor:publish --provider="Myerscode\Laravel\Taxonomies\ServiceProvider" --tag="migrations"
After the migration has been published, run the migrations to create the tags, taxonomies and taggables tables.
Usage
To make an Eloquent model taggable just add the \Myerscode\Laravel\Taxonomies\HasTaxonomy trait to it:
class Post extends Model { use \Myerscode\Laravel\Taxonomies\HasTaxonomy; ... }
Terms
Are the meta tags you want to add to your model, giving them a definable characteristic.
Taxonomies
Are are a way of grouping your terms together, categorising your collection.
For example a Taxonomy called Colours could contain terms such as Red, Yellow, Green and Blue.
Localisation
You can get translated names from your terms and taxonomies by setting localised language files.
Advance Usage
You can change the default Taxonomy or Term class by publishing the config, and modifying the classes to your custom models.
Publish the config file with:
php artisan vendor:publish --provider="Myerscode\Laravel\Taxonomies\ServiceProvider" --tag="config"
License
The MIT License (MIT). Please see License File for more information.
myerscode/laravel-taxonomies 适用场景与选型建议
myerscode/laravel-taxonomies 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.81k 次下载、GitHub Stars 达 9, 最近一次更新时间为 2018 年 12 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「wordpress」 「taxonomy」 「tags」 「laravel」 「terms」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 myerscode/laravel-taxonomies 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 myerscode/laravel-taxonomies 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 myerscode/laravel-taxonomies 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Icon support for Silverstripe taxonomy terms
Elemental Taxonomy module, provides a list of taxonomy terms under a selected type
WordPress plugin to automatically toggle the parent term when a sub term is selected.
Advanced taxonomies
Card.Shuffle extends Card.Deck functionality and adds filtering options, based on Sitegeist.Taxonomy package. With shuffle you can add tags to your cards and display filter options in the frontend.
Alfabank REST API integration
统计信息
- 总下载量: 5.81k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-17