getsno/relesys-users
Laravel 10 (PHP 8.1+) client for the Relesys User Management API. Access endpoints for users, departments, user groups, custom fields and communication with support for filtering, sorting and pagination, plus create/update users and status changes.
Relesys::users()->...) integrates seamlessly with Laravel’s service container and service provider patterns, reducing boilerplate for API interactions. The Laravel 13 support ensures compatibility with modern Laravel ecosystems, including dependency injection and service binding.User, UserPatch, UserStatus), simplifying complex API calls (e.g., pagination, filtering) into fluent method chains. This aligns well with Laravel’s Eloquent-like conventions.user.created, user.updated) for local side effects (e.g., logging, notifications) without modifying the package itself.UserStatus) and readonly properties improve IDE support and runtime safety, reducing bugs from invalid API inputs.Getsno\Relesys\RelesysServiceProvider) to bind the Relesys facade and HTTP client. This requires minimal setup (publish config, bind credentials) and integrates with Laravel’s config/app.php..env requirements (RELESYS_CLIENT_ID, RELESYS_CLIENT_SECRET) are standard for Laravel packages, but teams must ensure their deployment pipelines securely manage these secrets (e.g., Vault, AWS Secrets Manager).Http\Client or Guzzle under the hood. Teams using custom HTTP clients (e.g., monolithic apps) may need to mock or replace the client for testing.RelesysHttpClientException includes a failedRequest property, but custom error handling (e.g., retries, circuit breakers) may require wrapper logic in the application layer.getUsers() with remember()).RelesysHttpClientException).Http\Client updates, service provider bootstrapping) could affect this package’s integration? Are there known issues with the package’s current implementation?CustomFields value objects due to unclear API documentation. How will teams handle dynamic custom fields if Relesys’s schema evolves?createUser/updateUser calls)?Http\Client, Collections, and service container features. Teams already on Laravel 13 will see minimal integration effort.orchestra/testbench and phpunit dependencies align with Laravel’s testing stack but may require CI/CD adjustments.>=13.0) and PHP version (>=8.3) in composer.json.composer.json platform constraints if needed:
"config": {
"platform": {
"php": "8.3"
}
}
composer require getsno/relesys-users.php artisan vendor:publish --provider="Getsno\Relesys\RelesysServiceProvider"..env:
RELESYS_CLIENT_ID=your_client_id
RELESYS_CLIENT_SECRET=your_client_secret
config/relesys.php (if published).config/app.php (automatic if using Laravel’s autoloading).// Before (direct API call)
$response = Http::withHeaders([
'Authorization' => 'Bearer ' . $token,
])->post('https://api.relesysapp.net/v1.1/users', $data);
// After (using package)
$user = Relesys::users()->createUser($userData);
relesys.api.users scope.orchestra/testbench, phpunit) are testing-only and should not conflict with application code unless explicitly used.orchestra/testbench, phpunit) to avoid version conflicts..env credentials.Relesys::users()->getUser($id)).RelesysHttpClientException:
try {
$user = Relesys::users()->getUser($id);
} catch (RelesysHttpClientException $e) {
Log::error('Failed to fetch user', ['error'
How can I help you explore Laravel packages today?