PHP Package: staudenmeir/eloquent-json-relations

Eloquent JSON Relations is a PHP library for Laravel Eloquent models to manage and query JSON relationships efficiently.

Current Version: 1.14.1
Last Updated: 2025-02-25
PHP Requirement: ^8.2
Dependencies:
illuminate/database
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Eloquent JSON Relations is a powerful PHP library designed to enhance Laravel Eloquent models' capability by managing and querying JSON relationships with ease. It simplifies the process of dealing with JSON data structures in your database, providing efficient methods to handle complex relationships.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 1.14.1

Download Download v1.14.1

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/staudenmeir/eloquent-json-relations/1.14.1/loader.php';
require_once 'libs/illuminate/database/12.33.0/loader.php';

use Illuminate\Database\Eloquent\Model;
use Staudenmeir\EloquentJsonRelations\Relations\HasOneJson;
use Staudenmeir\EloquentJsonRelations\Relations\HasManyJson;

$obj = new Model();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.