PHPackages                             database-operations/common-database-operations - 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. [Database &amp; ORM](/categories/database)
4. /
5. database-operations/common-database-operations

ActiveLibrary[Database &amp; ORM](/categories/database)

database-operations/common-database-operations
==============================================

v1.0.1(2y ago)08PHPPHP &gt;=7.0.0

Since Jul 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/arslanayoub48/database-operations)[ Packagist](https://packagist.org/packages/database-operations/common-database-operations)[ RSS](/packages/database-operations-common-database-operations/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Database Operations
===================

[](#database-operations)

The ` Database Operations` package provides a trait for Laravel models to handle database operations and track user activity. It automatically populates database columns and simplifies the implementation of user tracking features.

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

[](#installation)

To install the ` Database Operations` package, follow these steps:

1. Ensure that you have [Composer](https://getcomposer.org/) installed on your machine.
2. Open your terminal and navigate to your Laravel project's directory.
3. Run the following command to install the package:

```
composer require database-operations/common-database-operations
```

4. After the package is installed, Laravel will automatically discover the package and register its service provider.

Usage
-----

[](#usage)

1. Add the `DatabaseOperations` trait to the model(s) where you want to implement database operations. For example:

```
use Common\DatabaseOperations\Traits\CommonDatabaseOperations;

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Common\DatabaseOperations\Traits\CommonDatabaseOperations;

class CreateMyTable extends Migration
{
    use CommonDatabaseOperations;

    public function up()
    {
        Schema::create('my_table', function (Blueprint $table) {
            $table->id();
            // Add other columns as needed

            $this->addCommonDBFields($table);

        });
    }

    // ...
}
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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

Every ~0 days

Total

2

Last Release

1043d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/824a400f18bdf5bd4985e7880cebd22f04272527151c1c089cf7e74ebc480872?d=identicon)[arslanayoub48](/maintainers/arslanayoub48)

---

Top Contributors

[![ArSal-Ayoub](https://avatars.githubusercontent.com/u/139043038?v=4)](https://github.com/ArSal-Ayoub "ArSal-Ayoub (19 commits)")

### Embed Badge

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

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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