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
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
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-30