masmerise / scrada-for-laravel
Laravel framework adapter for the Scrada SDK.
1.3.0
2026-04-15 11:03 UTC
Requires
- php: ~8.5
- illuminate/contracts: ^13.0
- illuminate/support: ^13.0
- masmerise/scrada-php-sdk: ^1.0
- webmozart/assert: ^2.0
Requires (Dev)
- larastan/larastan: ^3.9.3
- laravel/pint: ^1.29
- orchestra/testbench: ^11.0
This package is auto-updated.
Last update: 2026-04-15 11:06:30 UTC
README
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.