承接 smurfworks/laravel-model-meta 相关项目开发

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

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

smurfworks/laravel-model-meta

最新稳定版本:v0.0.4

Composer 安装命令:

composer require smurfworks/laravel-model-meta

包简介

Dynamically configure and capture strictly-typed metadata for your Laravel models as fluent attributes

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

"Laravel Model Meta" allows you to capture strictly typed field values for a model without having to alter a database schema.

What separates this package from other meta packages available? A combination of the following:

  • Quick to implement with low domain impact: This package will create only one meta table, regardless of the number of models you wish to store meta for and use a polymorphic relation.
  • Queryable data: This package does not use JSON to serialize a model's meta, and instead the meta values are stored in separate database fields depending on the configured meta key's storage type, allowing for database querying using type-dependent operators and indexing.
  • Strict typing and content management: The available meta keys are stored in their own database table, allowing for easy configuration via the command line, migration or your own custom GUI.
  • Reduced query load: Available meta fields are cached using an index created from the available meta key table after changes - no unnecessary database queries and no schema column listing queries.
  • Compatible with your project flow: Seeder helpers for importing meta keys from the standard Laravel seeding command, useful for project setup or keeping migrations ephemeral. Otherwise, register your model keys manually via the command line.
  • Along for the ride: Transform meta values from one type to another, or move them to a new schema field once validated as required by your domain.
  • Database driver agnostic: The package allows you to disable certain meta value types if your database driver doesn't support them, or you simply don't want them in the schema, so it won't create the columns when running migrations.

To save you time, you should know that to use this package, the Primary keys of your models with metadata values must be incremental - UUID relations are not currently supported. To solve this, you could alter the migrations and create your own class.

Installation

Please see INSTALL for more information on how to install the package.

Usage

Please see USAGE for more information on how to use the package.

Configuration

Please see CONFIGURATION for more information on how to configure the package.

Advanced details

For more information about some of the key design decisions and implementation details, please see ADVANCED.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing and Security Vulnerabilities

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固