承接 masmerise/scrada-for-laravel 相关项目开发

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

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

masmerise/scrada-for-laravel

Composer 安装命令:

composer require masmerise/scrada-for-laravel

包简介

Laravel framework adapter for the Scrada SDK.

README 文档

README

Scrada PHP SDK Laravel

Build Status Total Downloads Latest Stable Version License

Laravel adapter for the Scrada SDK

This package provides convenient access to the Scrada SDK using the Laravel framework.

Installation

You can install the package via composer:

composer require masmerise/scrada-for-laravel

After that, define your scrada credentials inside the config/services.php configuration file:

'scrada' => [
    'default' => env('SCRADA_COMPANY', 'default'),
    
    'companies' => [
        'default' => [
            'api_key' => env('SCRADA_API_KEY'),
            'password' => env('SCRADA_PASSWORD'),
            'env' => env('SCRADA_ENV', 'production'), // or 'test'
        ],
    ],
],

Usage

// Resolve a Scrada instance for a specific company
$company = scrada('default')->company->get($id);
// Resolve the manager and use the default company
$scrada = app('scrada');

$company = $scrada->company('default')->company->get($id);
use Scrada\Company\Type\Primitive\CompanyId;
use Scrada\Laravel\ScradaManager;

final readonly class CompanyController
{
    private function __construct(private ScradaManager $scrada) {}
    
    public function show(string $company, string $id): void
    {
        $id = CompanyId::fromString($id);
    
        return view('company.show', [
            'company' => $this->scrada->company($company)->company->get($id),
        ]);
    }
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security

If you discover any security related issues, please email support@masmerise.be instead of using the issue tracker.

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固