hallekamp/laravel-nomagicproperties

This package make it possible to define public properties on a model without breaking default Laravel magic.

1.1.16 2021-05-30 23:01 UTC

This package is auto-updated.

Last update: 2024-09-29 05:35:43 UTC


README

This is a Laravel to enable the use of public properties in model, but also retaining default laravel magic.

Installation

Install with composer:

composer require hallekamp/laravel-nomagicproperties

Usage

Just include the trait in your models.

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Hallekamp\NoMagicProperties\Traits\NoMagicProperties;

class NoMagicPropertiesModel extends Model
{
    use NoMagicProperties;
    ...
}

License

The files in this archive are licensed under the MIT license. You can find a copy of this license in LICENSE.txt.