avto-dev/json-rpc-laravel
Laravel integration for JSON-RPC 2.0: register RPC methods, expose HTTP endpoints, validate parameters, handle errors and middleware, and call remote JSON-RPC services from your app with a simple framework-native API.
RpcRouter::on() now accepts Laravel-style controller actions ([SomeController::class, 'method']), so existing HTTP controllers can be re-exposed as RPC methods without duplicating logic. This lowers the cost of shipping a single backend API that serves a SPA, a mobile app, and internal tooling, and it makes RPC endpoints a realistic option for teams already organized around Laravel controllers.Consider it when:
[Controller::class, 'method'] syntax lets you wire them up directly instead of writing adapter classes.Look elsewhere when:
For executives: This is a small, low-risk dependency that lets our Laravel backend expose RPC-style endpoints to our own web and mobile clients without building and maintaining custom routing and dispatch code. The v2.8.0 release is a maintenance release with one meaningful capability gain — we can now point RPC methods directly at our existing controllers — and a clear platform story: it supports Laravel 11 through 13 and PHP 8.5. The practical implication is that adopting it does not constrain our framework upgrade path, and it reduces the amount of bespoke API plumbing we own. The one decision it forces is timing: our Laravel version must be 11 or higher.
For engineering: v2.8.0 adds controller-action targets to RpcRouter::on(), so [SomeController::class, 'method'] replaces hand-written closures or adapter classes — less boilerplate, and existing tested controller logic becomes directly reachable over RPC. The release also raises the minimum Laravel to 11.0 and adds Laravel 13 and PHP 8.5 support, with dev dependencies (PHPStan 2.1.22, PHPUnit 10.5/11/12) and CI images (PHP 8.5, Xdebug 3.5.3) brought current. Action item: confirm our minimum Laravel version is 11.0+ before adopting; if we are below that, this upgrade is blocked on the framework upgrade and should be sequenced accordingly. There are no deprecations or removals listed, so the migration from the prior 2.x line is expected to be routine, but pin the version and run the suite against our supported Laravel matrix.
How can I help you explore Laravel packages today?