Download the PHP package upgate/laravel-jsonrpc without Composer
On this page you can find all versions of the php package upgate/laravel-jsonrpc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-jsonrpc
JSON-RPC Server for Laravel/Lumen
📢 Updates from Ukrainian Open Source Community
🇷🇺 Обращение к гражданам России
Quick How-To
- Install with composer:
composer require upgate/laravel-jsonrpc -
In your RouteServiceProvider, do something like this:
- Use $jsonRpcServer in your routes.php, like this:
See ServerTest and RouterTest for more examples.
Exception handling
Descendants of Upgate\LaravelJsonRpc\Exception\JsonRpcException represent JSON-RPC errors according to the spec (see Upgate\LaravelJsonRpc\Server\ErrorCode).
Other exceptions are logged and converted to INTERNAL_ERROR responses by default.
Use Upgate\LaravelJsonRpc\Server\Server::onException() to register custom exception handlers:
See ServerTest:: testSingleRequestWithExceptionHandler() and ServerTest::testExceptionHandlersPriority() for more examples.
JSON-RPC Request Forms
(since v0.3.0)
Upgate\LaravelJsonRpc\Server\FormRequest is similar to Laravel form requests, but validates JSON-RPC parameters instead.
Example:
If validation fails, the INVALID_PARAMS error response is returned, with validation error details in data.violations.
See the ServerFormRequestTest for more examples.
All versions of laravel-jsonrpc with dependencies
illuminate/contracts Version ^5.1 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12
illuminate/support Version ^5.1 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12
illuminate/http Version ^5.1 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12
illuminate/pipeline Version ^5.1 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12
psr/log Version ^1 || ^2 || ^3
ext-json Version *