Weave Code
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

Serializer Eloquent Laravel Package

nilportugues/serializer-eloquent

Eloquent ORM driver for nilportugues/serializer. Serialize Laravel/Eloquent models and their relationships into the Serializer library’s normalized array format, handling common Eloquent edge cases so you can reuse one consistent serialization layer across your app.

View on GitHub
Deep Wiki
Context7

Serializer Driver for Eloquent ORM Models

Build Status Scrutinizer Code Quality SensioLabsInsight Latest Stable Version Total Downloads License Donate

What?

This is a driver for the Serializer library caring of Eloquent ORM model serialization.

Why?

Due to the popularity of Eloquent, specially in Laravel apps, a driver has been develop to unite all Eloquent serialization edge-cases for Serializer in a single library.

Installation

Use Composer to install the package:

$ composer require nilportugues/serializer-eloquent

Usage

This will return an array following the Serializer format.

use NilPortugues\Serializer\Drivers\Eloquent\EloquentDriver;

$serialized = EloquentDriver::serialize($value);

Todo

Code all examples provided in the Eloquent documentation for relationships as tests:

  • One To One
  • One To Many
  • Has Many Through
  • Polymorphic Relations
  • Many To Many
  • Many To Many Polymorphic Relations

Contribute

Contributions to the package are always welcome!

Support

Get in touch with me using one of the following means:

Authors

License

The code base is licensed under the MIT license.

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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor