PHPackages                             inisiatif/common - 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. inisiatif/common

ActiveLibrary

inisiatif/common
================

Common package using in Inisiatif Zakat Indonesia

3.0.0(3mo ago)08.8k↓50%[2 PRs](https://github.com/atInisiatifZakat/common/pulls)1proprietaryPHPPHP ^8.1CI passing

Since Oct 12Pushed 1mo agoCompare

[ Source](https://github.com/atInisiatifZakat/common)[ Packagist](https://packagist.org/packages/inisiatif/common)[ RSS](/packages/inisiatif-common/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (15)Used By (1)

Inisiatif Common Package
========================

[](#inisiatif-common-package)

Common package yang digunakan di Inisiatif Zakat Indonesia.

Requirements
------------

[](#requirements)

- PHP 8.2, 8.3, atau 8.4
- Laravel 10.x, 11.x, atau 12.x

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

[](#installation)

```
composer require inisiatif/common
```

Configuration
-------------

[](#configuration)

Package ini akan otomatis register service provider melalui Laravel package discovery.

### Publish Configuration (Optional)

[](#publish-configuration-optional)

```
php artisan vendor:publish --provider="Inisiatif\Package\Common\Providers\CommonServiceProvider"
```

### Environment Variables

[](#environment-variables)

VariableDefaultDescription`COMMON_BRANCH_TABLE_NAME``branches`Nama tabel untuk model BranchFeatures
--------

[](#features)

### Models

[](#models)

#### Branch

[](#branch)

Model untuk menyimpan data cabang/branch.

```
use Inisiatif\Package\Common\Models\Branch;

$branch = Branch::find($id);
```

### Concerns (Traits)

[](#concerns-traits)

#### UuidPrimaryKey

[](#uuidprimarykey)

Trait untuk menggunakan UUID sebagai primary key.

```
use Inisiatif\Package\Common\Concerns\UuidPrimaryKey;

class MyModel extends Model
{
    use UuidPrimaryKey;
}
```

#### IntegerPrimaryKey

[](#integerprimarykey)

Trait untuk model dengan integer primary key.

#### HasBranch

[](#hasbranch)

Trait untuk model yang memiliki relasi ke Branch.

```
use Inisiatif\Package\Common\Concerns\HasBranch;

class MyModel extends Model
{
    use HasBranch;
}
```

#### TaggableCacheAware

[](#taggablecacheaware)

Trait untuk repository yang membutuhkan cache dengan tagging.

#### EloquentAwareRepository

[](#eloquentawarerepository)

Trait untuk repository pattern dengan Eloquent.

### Contracts (Interfaces)

[](#contracts-interfaces)

InterfaceDescription`ResourceInterface`Marker interface untuk model/resource`ModelRepositoryInterface`Interface untuk operasi repository model`EloquentAwareRepositoryInterface`Interface untuk repository dengan Eloquent`TaggableCacheAwareInterface`Interface untuk cache-aware repositories`HasBranchInterface`Interface untuk model yang memiliki branch`Notable`Interface untuk model yang dapat memiliki catatan### Abstract Classes

[](#abstract-classes)

#### AbstractRepository

[](#abstractrepository)

Base class untuk implementasi repository pattern.

```
use Inisiatif\Package\Common\Abstracts\AbstractRepository;
use Inisiatif\Package\Common\Contracts\ResourceInterface;

class UserRepository extends AbstractRepository
{
    protected $model = User::class;
}

// Model harus implement ResourceInterface
class User extends Model implements ResourceInterface
{
    use UuidPrimaryKey;
}
```

### Exceptions

[](#exceptions)

ExceptionDescription`DomainException`Base exception untuk domain errors`DomainActionException`Exception untuk action yang tidak valid`DomainModelExistException`Exception ketika model sudah ada`DomainModelNotExistException`Exception ketika model tidak ditemukanMigrations
----------

[](#migrations)

Package ini menyediakan migration untuk tabel `branches`. Untuk menonaktifkan migration:

```
use Inisiatif\Package\Common\Common;

// Di AppServiceProvider boot method
Common::ignoreMigrations();
```

Development
-----------

[](#development)

### Running Tests

[](#running-tests)

```
composer test
```

### Static Analysis

[](#static-analysis)

```
composer analyse
```

### Code Formatting

[](#code-formatting)

```
composer format
```

License
-------

[](#license)

Proprietary - Inisiatif Zakat Indonesia

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance85

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 59% 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

Every ~119 days

Recently: every ~196 days

Total

9

Last Release

106d ago

Major Versions

1.1.1 → 2.1.02023-06-27

1.1.2 → 2.1.12023-12-08

2.x-dev → 3.0.02026-02-02

PHP version history (3 changes)1.1.0PHP ~8.0.0|~8.1.0

2.1.0PHP ~8.1.0|~8.2.0

1.x-devPHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3500d4ed2061891d54f54b550fbb9e782d0d1838b7fee429578a0733b0a378bf?d=identicon)[NoorAdiana](/maintainers/NoorAdiana)

---

Top Contributors

[![nuradiyana](https://avatars.githubusercontent.com/u/1073802?v=4)](https://github.com/nuradiyana "nuradiyana (23 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/inisiatif-common/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k509.9M17.0k](/packages/laravel-framework)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k84.2M225](/packages/laravel-horizon)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[stancl/tenancy

Automatic multi-tenancy for your Laravel application.

4.3k6.6M40](/packages/stancl-tenancy)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)[google/cloud

Google Cloud Client Library

1.2k16.2M53](/packages/google-cloud)

PHPackages © 2026

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