承接 deegitalbe/trustup-pro-app-common 相关项目开发

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

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

deegitalbe/trustup-pro-app-common

Composer 安装命令:

composer require deegitalbe/trustup-pro-app-common

包简介

This package contains pieces of code that are shared between our applications.

README 文档

README

Via composer

composer require deegitalbe/trustup-pro-app-common

Configuration

Environment

Package expects you to have those lines in your .env

TRUSTUP_ADMIN_URL=
TRUSTUP_APP_KEY=
  • TRUSTUP_APP_KEY key should be unique identifier for current app. (e.g: "tasks" for application taches.trustup.pro)
  • TRUSTUP_ADMIN_URL should be defined in development mode only. (since package already has correct value for production)

Install command

Execute this command to install package and publish configuration.

php artisan trustup_pro_app_common:install

You will then have access to config/trustup_pro_app_common.php that you have to configure properly.

Preparing your model

Your model should be in charge of application professionals accounts. Typically it is App\Models\System\Account.php

Default configuration

Implements interface

Your model should implements this interface

Deegitalbe\TrustupProAppCommon\Contracts\AccountContract

Use default trait

You can use this trait in your model to synchronize automatically

Deegitalbe\TrustupProAppCommon\Models\Synchronizable

Custom configuration

Implements interface

Same step as default configuration step

Define interface methods yourself

/**
 * Account database id.
 * 
 * @return int
 */
public function getId(): int;

/**
 * Account uuid that should be used to retrieve account details.
 * 
 * @return string
 */
public function getUuid(): string;

/**
 * Application key linked to account.
 * 
 * @return string
 */
public function getAppKey(): string;

/**
 * Professional authorization_key linked to account.
 * 
 * @return string
 */
public function getAuthorizationKey(): string;

/**
 * Subscription id linked to account.
 * 
 * @return string|null
 */
public function getSubscriptionId(): ?string;

/**
 * Subscription status linked to account.
 * 
 * @return string|null
 */
public function getSubscriptionStatus(): ?string;

/**
 * Account creation date.
 * 
 * @return Carbon
 */
public function getCreatedAt(): Carbon;

Watch model events using package trait

You can use this trait in your model to watch its event and react to it when needed

Deegitalbe\TrustupProAppCommon\Models\SynchronizeWhenSaved

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固