承接 cline/variable-keys 相关项目开发

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

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

cline/variable-keys

最新稳定版本:1.2.0

Composer 安装命令:

composer require cline/variable-keys

包简介

Laravel Blueprint macros for variable primary key and morph types

关键字:

README 文档

README

GitHub Workflow Status Latest Version on Packagist Software License Total Downloads

variable-keys

Laravel Blueprint macros for variable primary key and morph types

Requirements

Requires PHP 8.4+

Installation

composer require cline/variable-keys 

Usage

use Cline\VariableKeys\Enums\PrimaryKeyType; use Cline\VariableKeys\Enums\MorphType; $primaryKeyType = PrimaryKeyType::tryFrom(config('database.primary_key_type')) ?? PrimaryKeyType::ID; Schema::create('users', function (Blueprint $table) use ($primaryKeyType) { // Clean macro instead of verbose match expression $table->variablePrimaryKey($primaryKeyType); $table->string('name'); $table->timestamps(); }); Schema::create('posts', function (Blueprint $table) use ($primaryKeyType) { $table->variablePrimaryKey($primaryKeyType); // Foreign key that matches the primary key type $table->variableForeignKey('user_id', $primaryKeyType) ->constrained() ->cascadeOnDelete(); $table->string('title'); $table->timestamps(); }); 

Documentation

Change log

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

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.

Credits

License

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

统计信息

  • 总下载量: 86
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 10
  • 推荐数: 0

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固