aw-studio/laravel-content-parser

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/aw-studio/laravel-content-parser

dev-main 2021-12-10 10:45 UTC

This package is auto-updated.

Last update: 2025-10-10 19:00:48 UTC


README

Install

composer require aw-studio/laravel-content-parser

Usage

use AwStudio\ContentParser\Content;

class Site extends Model
{
    protected $casts = [
        'content' => Content::class,
    ];
}

Using Relationships

Setup the related query:

class Site extends Model
{
    // ...

    public function authorQuery()
    {
        return User::query();
    }
}

One relation:

[
    {
        "type": "author",
        "value": "relation://author@1"
    }
]

Many relation:

[
    {
        "type": "author",
        "value": "relation://author@1,2"
    }
]