PHPackages                             siam401/api-utils - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. siam401/api-utils

ActiveLibrary[File &amp; Storage](/categories/file-storage)

siam401/api-utils
=================

A Laravel package for file uploads.

v1.0.0(12mo ago)01MITPHP

Since May 24Pushed 12mo agoCompare

[ Source](https://github.com/Siam401/laravel-api-utils)[ Packagist](https://packagist.org/packages/siam401/api-utils)[ RSS](/packages/siam401-api-utils/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

API Utils for Laravel
=====================

[](#api-utils-for-laravel)

A simple Laravel helper to standardize API JSON responses.

📦 Installation
--------------

[](#-installation)

```
composer require siam401/api-utils
```

🚀 Usage
-------

[](#-usage)

Import the class:

```
use Siam401\ApiUtils\ApiUtil;
```

### ✅ Success Response

[](#-success-response)

```
return ApiUtil::success('Fetched successfully', $data);
```

### ❌ Failure Response

[](#-failure-response)

```
return ApiUtil::failure('Something went wrong', 400, ['field' => 'error']);
```

### 💥 Crash Response

[](#-crash-response)

```
return ApiUtil::crash('Unexpected system error', 500, ['exception' => $e->getMessage()]);
```

### 🔍 Not Found Response

[](#-not-found-response)

```
return ApiUtil::notFound('Record not found');
```

📁 Response Format
-----------------

[](#-response-format)

All responses follow a consistent structure:

```
{
  "message": "Description",
  "contents": {...}
}
```

🛠️ Requirements
---------------

[](#️-requirements)

- PHP ^8.0
- Laravel 9 or 10

📄 License
---------

[](#-license)

This package is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance50

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

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

360d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54e1fea7cd0ef950352848e13e74c87a6c47ed6c8b30393595c0c6166d257290?d=identicon)[Siam401](/maintainers/Siam401)

---

Top Contributors

[![Siam401](https://avatars.githubusercontent.com/u/41126304?v=4)](https://github.com/Siam401 "Siam401 (5 commits)")

### Embed Badge

![Health badge](/badges/siam401-api-utils/health.svg)

```
[![Health](https://phpackages.com/badges/siam401-api-utils/health.svg)](https://phpackages.com/packages/siam401-api-utils)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15161.6M2.6k](/packages/illuminate-filesystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[madnest/madzipper

Easier zip file handling for Laravel applications.

1382.3M6](/packages/madnest-madzipper)

PHPackages © 2026

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