Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Json Api Server

Json Api Server Laravel Package

enm/json-api-server

Abstract server-side PHP implementation of the JSON:API specification, built on enm/json-api-common. Provides endpoints, request handling, and exception handling for building JSON:API-compliant APIs in Laravel or any PHP application.

View on GitHub
Deep Wiki
Context7

Abstract server-side php implementation of the json api specification (jsonapi.org)

Frequently asked questions about Json Api Server
Is enm/json-api-server a Laravel package?
No. It is a framework-agnostic library and ships no service provider, config file, facade or Artisan command. A Laravel application consumes it as a plain Composer dependency wrapped in a thin adapter layer you write yourself. It sits well below the Eloquent resource abstraction most Laravel teams expect.
How do I install enm/json-api-server?
Run composer require enm/json-api-server; the package is MIT licensed and also pulls in enm/json-api-common. Installation itself is trivial, but it is only the starting point. The real work is authoring your resource, endpoint and request handler classes, so read the json-api-common docs before writing code.
Does enm/json-api-server work with PHP 8 and Laravel 10 or 11?
This is unverified and unlikely to work out of the box. The project was archived with its last release on 2018-10-29, which places it squarely in the PHP 7.x era. PHP 8 deprecations and modern Laravel bootstrapping become your responsibility, so prototype under your exact target versions in isolation before committing.
Is enm/json-api-server still maintained?
No. The repository is archived, the last release was 2018-10-29, and it has roughly 12 stars and zero dependents. There is no active security response, no upstream bug fixes and effectively no community or tutorial corpus. Treat it as fork-and-own rather than a dependency you simply adopt.
What do I have to build myself when using enm/json-api-server?
Almost the entire concrete layer. You write resource classes, endpoint definitions, request handlers, exception-to-error mappings, model-to-resource mapping and relationship traversal. You also supply the Laravel glue for routing, middleware, authentication and dependency injection. There is no Eloquent integration and no automatic mapping of any kind.
Do I need enm/json-api-common as well as enm/json-api-server?
Yes. enm/json-api-common defines the foundational structures such as resources, documents and schema, and json-api-server builds the server transport layer on top of them. The README explicitly instructs you to read those docs first. Without understanding that model, the server abstractions will not make sense.
How do I wire enm/json-api-server into Laravel routing, middleware and auth?
Manually. You register a custom service provider, define a route group, and add an exception renderer that converts library exceptions into JSON:API error documents. Authentication and middleware bridging are yours to implement as well. Consider packaging this adapter code so the wiring lives in one place instead of scattering across the app.
Does enm/json-api-server handle compound documents, sparse fieldsets, sorting, pagination and filtering?
The library implements the transport and serialization layer, so request handling and resource abstractions are present, but concrete behaviour depends on what you build. Compound documents, sparse fieldsets, sorting, pagination and filtering must each be validated in a prototype against your product requirements. Do not assume spec coverage without running a spike first.
What are the alternatives to enm/json-api-server for JSON:API in Laravel?
For a Laravel-native experience, look at laravel-json-api, which integrates with Eloquent, routing and validation. Spatie packages such as laravel-fractal or laravel-query-builder are options for simpler REST serialization workflows. If your consumers do not need the JSON:API contract, plain REST or GraphQL may be the better fit.
How should I test and validate an API built on enm/json-api-server before production?
Fork the repository, confirm it runs on your target PHP version, then prototype one resource end-to-end to measure the concrete-layer effort. No testing helpers or Laravel factories ship with the package, so write integration tests against real HTTP responses, error documents and relationship endpoints. Adopt only if your team accepts custodianship of an archived dependency.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle