eeappdev/laravel-external-id 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

eeappdev/laravel-external-id

最新稳定版本:0.0.4

Composer 安装命令:

composer require eeappdev/laravel-external-id

包简介

Make a morph-table to keep track of external id relationships for external API

README 文档

README

Latest Version on Packagist Total Downloads

When you are working with an external API, and need to syncronize clients, products, services, categories or like, this package help you to store the external id for all the models you want.

This package provides a HasExternalId trait that, once installed on a model, allows you to do things like this:

// Store (update or create) the external id
$model->addExternalId('external_unique_id');

// Remove/unlink an external ID
$model->removeExternalId();

// Get the external ID
$model->getExternalID();

// Get all external information
$model->external()

Installation

You can install the package via composer:

composer require eeappdev/laravel-external-id

You must publish the migration with:

php artisan vendor:publish --provider="Eeappdev\ExternalId\ExternalIdServiceProvider" --tag="migrations"

Migrate the external_ids table:

php artisan migrate

Usage

Add the HasExternalId trait to a model you like to use external relationships on.

use Eeappdev\ExternalId\HasExternalId;

class Client extends Model
{
    use HasExternalId;

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-30