承接 assurdeal/laravel-orias 相关项目开发

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

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

assurdeal/laravel-orias

最新稳定版本:v0.2.1

Composer 安装命令:

composer require assurdeal/laravel-orias

包简介

Work with the ORIAS web service in Laravel

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package allows you to integrate the ORIAS webservice into your Laravel application. You can use it to validate an ORIAS number, or to retrieve information about a Broker.

Installation

You can install the package via composer:

composer require assurdeal/laravel-orias

Add your ORIAS webservice API key to your .env file

ORIAS_KEY=your-api-key

Usage

use Assurdeal\LaravelOrias\Requests\ShowBrokerRequest;

$response = ShowBrokerRequest::make('123456789')->send();

/** @var \Assurdeal\LaravelOrias\Data\Intermediary $dto */
$dto = $response->dto();

Usage as validator

use Assurdeal\LaravelOrias\Rules\RegisteredIntermediary;
use Assurdeal\LaravelOrias\Enums\RegistrationCategory;

Validator::make($data, [
    'orias' => ['required', new RegisteredIntermediary()],
]);

Validator::make($data, [
    'orias' => [
        'required', 
        (new RegisteredIntermediary())->withAllOfCategories(
            RegistrationCategory::COA,
            RegistrationCategory::AGA
        )
    ],
]);

Validator::make($data, [
    'orias' => [
        'required', 
        (new RegisteredIntermediary())->withAnyOfCategories(
            RegistrationCategory::COA,
            RegistrationCategory::AGA
        )
    ],
]);

Translations

Add the following lines to your lang/xx.json files where xx represents the locale you want to translate in.

Example for resources/fr.json

{
  "The :attribute is not of a valid length.": "Le :attribute n'est pas d'une longueur valide.",
  "The :attribute is not a registered intermediary.": "Le :attribute n'est pas un intermédiaire enregistré.",
  "The :attribute was not found in the registry of intermediaries.": "Le :attribute n'a pas été trouvé dans le registre des intermédiaires.",
  "The :attribute is not registered for any of the valid categories.": "Le :attribute n'est pas enregistré pour aucune des catégories valides.",
  "The :attribute is not registered for all of the valid categories.": "Le :attribute n'est pas enregistré pour toutes les catégories valides."
}

Testing

composer test

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固