承接 myerscode/laravel-taxonomies 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

myerscode/laravel-taxonomies

最新稳定版本:13.0.0

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

Latest Stable Version Total Downloads PHP Version Require License Tests codecov

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.

统计信息

  • 总下载量: 5.66k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固