chedilas/safehaven_mfb 问题修复 & 功能扩展

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

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

chedilas/safehaven_mfb

Composer 安装命令:

composer require chedilas/safehaven_mfb

包简介

A simple integration of a safehaven packages

README 文档

README

Safe Haven MFB for your Laravel project made easy

Installation

You can install the package via composer:

composer require chedilas/safehaven_mfb

Publishing the config file

php artisan vendor:publish --provider="CheDilas\SafeHaven\SafeHavenServiceProvider" --tag="config"

Usage

use CheDilas\SafeHaven\SafeHaven;

//Create Account
$accountType = "Savings";
$accountName = "Che Dilas Yusuph";
SafeHaven::account()->createAccount($accountType, $accountName, [
    "verified" => true,
    "notes" => ""
]);

For more information, please refer to the package documentation.

Automatic API Token Refresh

For seamless and uninterrupted access to API endpoints, it's recommended to integrate an automated mechanism in your Laravel application. This mechanism will be responsible for generating client assertions and subsequently exchanging them for API tokens. By doing so, the API token gets refreshed automatically before it reaches its expiration, ensuring your API interactions remain consistent and uninterrupted. To implement this, simply add the provided script to your Laravel application's cron job configuration

Step 1: Import ApiRequestor from CheDilas\SafeHaven.

use CheDilas\SafeHaven\ApiRequestor;

Step 2: Update schedule in app/Console/Kernel.php to refresh the token every 30 minutes.

protected function schedule(Schedule $schedule)
{
    $schedule->call(function () {
        (new ApiRequestor())->token();
    })->everyThirtyMinutes();
}

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email josephdilas@gmail.com instead of using the issue tracker.

License

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

统计信息

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

GitHub 信息

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

其他信息

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