ui-awesome/model

UIAwesome Model for PHP.

0.1.0 2024-03-18 21:49 UTC

This package is auto-updated.

Last update: 2024-12-18 23:27:30 UTC


README

UIAwesome Model for PHP.


PHPUnit Codecov Infection Psalm Psalm Coverage Style ci

The UIAwesome Model package provides a robust set of tools for managing data models in PHP applications.

<?php

declare(strict_types=1);

namespace App\Model;

use UIAwesome\Model\{AbstractModel, Attribute\DoNotCollect, Attribute\Timestamp};

final class User extends AbstractModel
{
    private int $age;
    private string $name;
    #[DoNotCollect] // attribute for do not collect
    private int $flag = 0;
    private bool $isActive;
    #[Timestamp] // attribute for timestamp
    private int $updatedAt = 0;
}

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist ui-awesome/model:"^0.1"

or add

"ui-awesome/model": "^0.1"

Usage

Check the documentation docs to learn about usage.

Testing

Check the documentation testing to learn about testing.

Support versions

PHP81

License

The MIT License (MIT). Please see License File for more information.

Our social networks

Twitter