PHPackages                             kouja/project-assistant - 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. kouja/project-assistant

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

kouja/project-assistant
=======================

Package for installing initial files and dependencies for starting your project

0.0.5(5y ago)2474MITPHP

Since May 1Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Ahmad-Mohammad-Kouja/Project-Assistant)[ Packagist](https://packagist.org/packages/kouja/project-assistant)[ RSS](/packages/kouja-project-assistant/feed)WikiDiscussions main Synced 6d ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Introduction
============

[](#introduction)

This Package get rid of Duplicate Work like handling json response and writing duplicated query

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

[](#installation)

Package can be installed via composer

```
 composer require kouja/project-assistant
```

Features
--------

[](#features)

- Extended Model stub
- Custom Exception
- Custom Form Request
- New Helper Class

Usage/Examples
--------------

[](#usageexamples)

Extended Model

You Can Add New Model Using Command

```
php artisan make:extended_model

```

The New Model Will Be like This

```
class Roynex extends BaseModel
{
    use HasFactory;

    protected $table = '';

    protected $fillable = [];

    protected $hidden = [];

    protected $dates = [];

    protected $casts = [];

}
```

The New Model Extend BaseModel Class

BaseModel Class For Now is only using ModelTrait

That Look like This

```
trait ModelTrait
{
    public function createData($data)
    {
        try{
            $createdModel = $this::create($data);

            if(empty($createdModel))
            throw new CreatingModelFailException('creating data fail');

        }catch(Exception $excption)
        {
            throw new CreatingModelFailException($excption->getMessage());
        }

        return $createdModel;
    }

    public function insertData($data)
    {
        try{
            $insertedData = $this->insert($data);

            if(empty($insertedData))
            throw new InsertingDataFailException('inserting data fail');

        }catch(Exception $excption)
        {
            throw new InsertingDataFailException($excption->getMessage());
        }

        return $insertedData;
    }

    public function updateData($filter, $newData)
    {
         try{
            $updatedDataStatus = $this::where($filter)
            ->update($newData);

            if(empty($updatedDataStatus))
            throw new UpdatingModelFailException('updating data fail');

        }catch(Exception $excption)
        {
            throw new UpdatingModelFailException($excption->getMessage());
        }

        return $updatedDataStatus;
    }

    public function updateOrCreateData($filter,$data)
    {
        try{
            $queryResult = $this->updateOrCreate($filter,$data);

            if(empty($queryResult))
            throw new UpdatingModelFailException('deleting data fail');

        }catch(Exception $excption)
        {
            throw new UpdatingModelFailException($excption->getMessage());
        }

        return $queryResult;
    }

    public function softDeleteData($filter)
    {
       try{
        $deletingDataStatus = $this::where($filter)
        ->delete();

        if(empty($deletingDataStatus))
        throw new DeletingModelFailException('deleting data fail');

    }catch(Exception $excption)
    {
        throw new DeletingModelFailException($excption->getMessage());
    }

    return $deletingDataStatus;

    }

    public function forceDeleteData($filter)
    {
        try{
            $deletingDataStatus = $this::where($filter)
            ->forceDelete();

            if(empty($deletingDataStatus))
            throw new DeletingModelFailException('deleting data fail');

        }catch(Exception $excption)
        {
            throw new DeletingModelFailException($excption->getMessage());
        }

        return $deletingDataStatus;

    }

}
```

This Query Are Duplicated in Every Model so Insted of Writing Them in Every Model We Are Using Them in This Trait

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

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 ~2 days

Total

5

Last Release

1833d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c57903dbf4bee8509cf5f7b0b5ce557719a29aaef8fbf08e8fd4b8a0122c30a?d=identicon)[AhmadMohammadKouja](/maintainers/AhmadMohammadKouja)

### Embed Badge

![Health badge](/badges/kouja-project-assistant/health.svg)

```
[![Health](https://phpackages.com/badges/kouja-project-assistant/health.svg)](https://phpackages.com/packages/kouja-project-assistant)
```

###  Alternatives

[eftec/autoloadone

AutoloadOne is a program that generates an autoload class for PHP.

403.4k](/packages/eftec-autoloadone)

PHPackages © 2026

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