Skip to content

Larapac/EloquentValueObjectCasts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Eloquent ValueObject Casts

use Illuminate\Database\Eloquent\Model;
use Larapac\EloquentValueObjectCasts\CastsValueObjectsTrait.php;

class Foo extend Model
{
    use CastsValueObjectsTrait

    protected $casts = [
        'is_bar' => 'boolean',
        'options' => FooOptions::class,
        'metadata' => ModelsMetadata::class,
    ];

    //...
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages