PHPackages                             javaabu/pgodb-sdk-laravel - 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. javaabu/pgodb-sdk-laravel

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

javaabu/pgodb-sdk-laravel
=========================

pgodb-sdk-laravel

v0.1.0(3y ago)09MITPHPPHP ^7.4|^8.0

Since Mar 9Pushed 3y ago3 watchersCompare

[ Source](https://github.com/Javaabu/pgodb-sdk-laravel)[ Packagist](https://packagist.org/packages/javaabu/pgodb-sdk-laravel)[ Docs](https://github.com/javaabu/pgodb-sdk-laravel)[ GitHub Sponsors](https://github.com/sponsors/spatie)[ Fund](https://spatie.be/open-source/support-us)[ RSS](/packages/javaabu-pgodb-sdk-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

PGODB SDK Laravel
=================

[](#pgodb-sdk-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2eae5a17c0bc4ffb8bce3b96725ac6c9e1030a7fded4c68acc1a9671462c87b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6176616162752f70676f64622d73646b2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/javaabu/pgodb-sdk-laravel)

Laravel SDK for Prosecutor General's Office's Criminal Justice Sector database.

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

[](#installation)

You can install the package via composer:

```
composer require javaabu/pgodb-sdk-laravel
```

### Setting up PGODB Credentials

[](#setting-up-pgodb-credentials)

Add your personal access token for the PGODB system as well as the base URL to your `config/pgodb.php`:

```
// config/pgodb.php
...
'api_key' => env('PGODB_API_KEY'),
'base_uri' => env('PGODB_BASE_URI')
...
```

Usage
-----

[](#usage)

Using the App container:

```
$pgodb = App::make('pgodb-api');
$criminal_case = $pgodb->criminalCase()->find('376/2022');
```

Using the Facade

```
use PgoDbAPI;

$criminal_case = PgoDbAPI::criminalCase()->find('376/2022');
```

### Available Methods

[](#available-methods)

This package serves as a thin wrapper around the [PGODB SDK](https://github.com/Javaabu/pgodb-sdk) package.

### Retrieve all Models

[](#retrieve-all-models)

```
PgoDbAPI::criminalCase()->get();
```

#### Retrieve by Id

[](#retrieve-by-id)

We do not use database ids, but rather administrative identification strings such as an individual's national identity card number, passport number, registration number (for judges and lawyers), incident reference numbers, gaziyyah numbers and the like.

```
PgoDbAPI::criminalCase()->find($idString);
```

This is a wrapper for the `filter` functionality built into this package. An alternate way of doing this is as follows:

```
PgoDbAPI::criminalCase()->addFilter("search", $idString)->get();
```

The search term would change depending on the model being retrieved. The `find` function abstracts this complexity away for the user.

#### Store Non-Nested Model

[](#store-non-nested-model)

```
// Sample data
$data = [
    "incident_reference_number": "2123756022",
    "institution_reg_no": "pgo",
    "incident_at": "1996-12-30T09:11:26.000000Z",
    "lodged_at": "1998-03-13T19:00:00.000000Z"
];

PgoDbAPI::criminalCase()->store($data);
```

#### Store Nested Model

[](#store-nested-model)

```
// Sample data
$data = [
    "individual": [
        "nid": "A169993",
        "name": "Dr. Larissa Stokes",
        "name_en": "Mr. Benedict Lockman I",
        "gender": "female",
        "mobile_number": "860.660.2765",
        "nationality_code": "MV",
        "permanent_address_country_code": "MV",
        "permanent_address_city_code": "LD0894",
        "permanent_address": "67353 Rebeka Road\nEast Opal, PA 94709",
        "individual_type": "local",
        "dob": "1995-07-14T19:00:00.000000Z",
        "email": "pemmerich@example.net"
    ]
];

PgoDbAPI::criminalCase()
      ->whereId("7/2022")
      ->complainant()
      ->store($data);
```

#### Update Non-Nested Model

[](#update-non-nested-model)

```
// Sample data
$data = [
    "institution_reg_no": "javaabu",
];

PgoDbAPI::criminalCase()
      ->whereId("2123756022")
      ->update($data);
```

#### Update Nested Model

[](#update-nested-model)

```
// Sample data
$data = [
    "individual": [
        "permanent_address_country_code": "MV",
    ]
];

PgoDbAPI::criminalCase()
      ->whereId("7/2022")
      ->complainant()
      ->whereId("A169993")
      ->update($data);
```

#### Sorting

[](#sorting)

```
PgoDbAPI::criminalCase()
      ->addSort("created_at")
      ->addSortByDesc("updated_at")
      ->get()
```

### Ending Functions

[](#ending-functions)

The ending functions of each of these chained functions are defined as follows. The actual API request will be sent once these ending functions are called at the end of the chain.

- `get()` Should return a list of items,
- `find($id)` Should return a single item,
- `delete($id)` Sends a delete request and returns true or false,
- `store($data)` Returns the newly stored record,
- `update($data)` Returns the updated record.

Credits
-------

[](#credits)

- [Ibrahim Hussain Shareef](https://github.com/Javaabu)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity40

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

Unknown

Total

1

Last Release

1158d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6671720?v=4)[Arushad Ahmed](/maintainers/dash8x)[@dash8x](https://github.com/dash8x)

![](https://avatars.githubusercontent.com/u/31658513?v=4)[Javaabu](/maintainers/javaabu)[@Javaabu](https://github.com/Javaabu)

![](https://www.gravatar.com/avatar/6e504a7bf85cca1e38f07b4c4ae89e76bd46f9cd9c1517770ae2b8a209460d3c?d=identicon)[ibnnajjaar](/maintainers/ibnnajjaar)

![](https://www.gravatar.com/avatar/e799f0bd10d4438d57b4ea679ffbaeda2d7aa6145e7a7031d61758481563a203?d=identicon)[ihshareef](/maintainers/ihshareef)

---

Top Contributors

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

---

Tags

javaabupgodb-sdk-laravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/javaabu-pgodb-sdk-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/javaabu-pgodb-sdk-laravel/health.svg)](https://phpackages.com/packages/javaabu-pgodb-sdk-laravel)
```

###  Alternatives

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M188](/packages/spatie-laravel-backup)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[kreait/laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

1.3k16.5M42](/packages/kreait-laravel-firebase)[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.1M11](/packages/bavix-laravel-wallet)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)

PHPackages © 2026

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