PHPackages                             khant-nyar/service-extender - 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. khant-nyar/service-extender

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

khant-nyar/service-extender
===========================

Creating a service base crud quickly

v1.0.1(1y ago)31.7k1[1 PRs](https://github.com/Khant-Nyar/service-extender/pulls)MITPHPPHP ^8.2

Since Feb 15Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/Khant-Nyar/service-extender)[ Packagist](https://packagist.org/packages/khant-nyar/service-extender)[ Docs](https://github.com/khant-nyar/service-extender)[ RSS](/packages/khant-nyar-service-extender/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (5)Used By (0)

Very short description of the package
=====================================

[](#very-short-description-of-the-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7b32818b2170bccf1b84bb60648bb607c3bbd204793e978a272581998600a179/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b68616e742d6e7961722f736572766963652d657874656e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/khant-nyar/service-extender)[![Total Downloads](https://camo.githubusercontent.com/ca01d4decad14ef31f214d84d664361d95db6a64a8f3d1069a333cd17e85dd02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b68616e742d6e7961722f736572766963652d657874656e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/khant-nyar/service-extender)[![GitHub Actions](https://github.com/khant-nyar/service-extender/actions/workflows/main.yml/badge.svg)](https://github.com/khant-nyar/service-extender/actions/workflows/main.yml/badge.svg)

- ✅ Improved Type Safety – Helps with debugging and prevents invalid data types.
- ✅ IDE-Friendly Navigation – Ctrl+Click methods to jump to service class.
- ✅ Automatic Transactions – Prevents database inconsistencies.
- ✅ Logging Enabled – Tracks changes for debugging.
- ✅ Easily Extendable – New services can override methods as needed.

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

[](#installation)

You can install the package via composer:

```
composer require khant-nyar/service-extender
```

Usage
-----

[](#usage)

```
/**
 * Example uses with UserService
 */

namespace App\Services;

use App\Models\User;
use KhantNyar\ServiceExtender\Services\EloquenceService;

class UserService extends EloquenceService
{
    protected static string $model = User::class;
}
```

it will generate automacally for UserService::all(),find($id),create($data)

```
/**
 * Example uses in controller
 */

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Services\UserService;

class UserController extends Controller
{
    public function index()
    {
        return response()->json(UserService::all());
    }

    public function show($id)
    {
        return response()->json(UserService::find((int) $id));
    }

    public function store(Request $request)
    {
        $data = $request->validate([
            'name' => 'required|string|max:255',
            'email' => 'required|email|unique:users',
            'password' => 'required|min:6'
        ]);

        return response()->json(UserService::create($data), 201);
    }

    public function update(Request $request, $id)
    {
        $data = $request->validate([
            'name' => 'sometimes|string|max:255',
            'email' => 'sometimes|email|unique:users,email,' . $id,
            'password' => 'sometimes|min:6'
        ]);

        return response()->json(UserService::update((int) $id, $data));
    }

    public function destroy($id)
    {
        return response()->json(['success' => UserService::delete((int) $id)]);
    }
}
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Khant-Nyar](https://github.com/khant-nyar)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance60

Regular maintenance activity

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.6% 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 ~7 days

Total

3

Last Release

435d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6fd9753c5688f2ce9f250db8f1a869fe1ffe19c93b2310e95beb86277922dfbf?d=identicon)[Khant-Nyar](/maintainers/Khant-Nyar)

---

Top Contributors

[![KhantNyar-dev](https://avatars.githubusercontent.com/u/111043281?v=4)](https://github.com/KhantNyar-dev "KhantNyar-dev (11 commits)")[![Khant-Nyar](https://avatars.githubusercontent.com/u/61083917?v=4)](https://github.com/Khant-Nyar "Khant-Nyar (3 commits)")

---

Tags

khant-nyarservice-extender

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/khant-nyar-service-extender/health.svg)

```
[![Health](https://phpackages.com/badges/khant-nyar-service-extender/health.svg)](https://phpackages.com/packages/khant-nyar-service-extender)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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