ui-awesome/model

UIAwesome Model for PHP.

0.1.0 2024-03-18 21:49 UTC

This package is auto-updated.

Last update: 2024-04-18 22:05:23 UTC


README

103309199?s%25253D400%252526u%25253Dca3561c692f53ed7eb290d3bb226a2828741606f%252526v%25253D4

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