Download the PHP package motia/laravel-jms-serializer without Composer
On this page you can find all versions of the php package motia/laravel-jms-serializer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package laravel-jms-serializer
laravel-jms-serializer
A Library for serializer intergration with Laravel. Useful to serialize doctrine entities or any plain objects in general.
This package injects into your application two service contracts:
DataNormalizer: converts the data to a php array.ResponseSerializer: normalizes the data usingDataNormalizerthen builds aIlluminate\Http\Responseobject containting it.
The default implemntation of ResponseSerializer follows the jsend api schema
Installation
Register the package service provider by adding it toconfig/app.php
Usage:
-
Inside Controllers
- The serializer can also indicate errors and failed requests.
Data type serializers
The package supports serializing:
- the Laravel pagination object
LengthAwarePaginator['pagination' => ['total' => 5, 'perPage' => 10... ], 'items' => [...] ] The property'items' can be renamed using the serializer context'itemsKey'property like that:
The 'items' property of the array can be renamed using
Ramsey\Uuid\UuidCarbon\Carbon: serialized to a ISO8086 string readable by all browsers.
All versions of laravel-jms-serializer with dependencies
PHP Build Version
Package Version
Requires
jms/serializer Version
^2.0
The package motia/laravel-jms-serializer contains the following files
Loading the files please wait ...