PHPackages                             atellitech/utils-hyperf - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. atellitech/utils-hyperf

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

atellitech/utils-hyperf
=======================

The utilities for Hyperf framework.

2.0.4(1mo ago)0161MITPHPPHP &gt;=8.3

Since Oct 8Pushed 1mo agoCompare

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

READMEChangelog (10)Dependencies (16)Versions (37)Used By (0)

utils-hyperf
============

[](#utils-hyperf)

Utilities for Hyperf 3.1 applications.

This package provides common development utilities for Hyperf projects, including:

- Base Repository abstraction
- Batch insert / upsert helpers
- Audit log utilities
- Model generator
- Repository / ValueObject / Validator generators
- API spec page generator
- Dependency file generator

---

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

[](#requirements)

- PHP 8.3+
- Hyperf 3.1+
- Composer

---

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

[](#installation)

```
composer require atellitech/utils-hyperf
```

If you are developing this package locally:

```
composer create-project hyperf/component-creator
```

---

Publish Config
--------------

[](#publish-config)

```
php bin/hyperf.php vendor:publish atellitech/utils-hyperf
```

This will publish the config file to:

```
config/autoload/audit_log.php

```

---

Core Repository
===============

[](#core-repository)

`AbstractRepository` provides a reusable base repository for Hyperf models.

It is designed for common CRUD operations, query builder access, transaction handling, batch insert, upsert, and MySQL duplicate key update.

Basic Usage
-----------

[](#basic-usage)

Create a repository class:

```
