PHPackages                             artisansdk/model - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. artisansdk/model

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

artisansdk/model
================

A self-validating model compatible with Laravel Eloquent that validates when it's saved.

1.0.x-dev(1y ago)04.9k↓40.5%11MITPHPPHP &gt;=8.2

Since Mar 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/artisansdk/model)[ Packagist](https://packagist.org/packages/artisansdk/model)[ RSS](/packages/artisansdk-model/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (12)Versions (2)Used By (1)

Self-Validating Model
=====================

[](#self-validating-model)

A self-validating model compatible with Laravel Eloquent that validates when it's saved.

Table of Contents
-----------------

[](#table-of-contents)

- [Self-Validating Model](#self-validating-model)
    - [Table of Contents](#table-of-contents)
    - [Installation](#installation)
    - [Usage Guide](#usage-guide)
    - [Running the Tests](#running-the-tests)
    - [Licensing](#licensing)

Installation
------------

[](#installation)

The package installs into a PHP application like any other PHP package:

```
composer require artisansdk/model
```

Now all you need to do is swap from the base `Illuminate\Database\Eloquent\Model` model to the `ArtisanSdk\Model\Eloquent`:

```
namespace App\Models;

use ArtisanSdk\Model\Eloquent as Model;

class User extends Model
{
    /**
     * Get the validation rules.
     */
    public function rules() : array
    {
        return [
            'name' => ['required', 'string', 'max:64'],
            'password' => ['required'],
        ];
    }
}
```

Usage Guide
-----------

[](#usage-guide)

&lt;needs description&gt;

Running the Tests
-----------------

[](#running-the-tests)

The package is unit tested with 100% line coverage and path coverage. You can run the tests by simply cloning the source, installing the dependencies, and then running `./vendor/bin/phpunit`. Additionally included in the developer dependencies are some Composer scripts which can assist with Code Styling and coverage reporting:

```
composer check
composer coverage
composer fix
composer test
composer retry
```

See the `composer.json` for more details on their execution and reporting output.

Licensing
---------

[](#licensing)

Copyright (c) 2018-2023 [Artisan Made, Co.](http://artisanmade.io)

This package is released under the MIT license. Please see the LICENSE file distributed with every copy of the code for commercial licensing terms.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance46

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

415d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/666d86ac1ee40735fd5eff2c8d7440d2021f5433217d74c101e7b1e39d611eed?d=identicon)[dalabarge](/maintainers/dalabarge)

---

Top Contributors

[![dalabarge](https://avatars.githubusercontent.com/u/879419?v=4)](https://github.com/dalabarge "dalabarge (5 commits)")[![RaubJo](https://avatars.githubusercontent.com/u/26422637?v=4)](https://github.com/RaubJo "RaubJo (2 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/artisansdk-model/health.svg)

```
[![Health](https://phpackages.com/badges/artisansdk-model/health.svg)](https://phpackages.com/packages/artisansdk-model)
```

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

759569.4k13](/packages/wendelladriel-laravel-validated-dto)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
