PHPackages                             bsiorg/primetrust-client-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. [API Development](/categories/api)
4. /
5. bsiorg/primetrust-client-laravel

ActiveLibrary[API Development](/categories/api)

bsiorg/primetrust-client-laravel
================================

A api client implementation in laravel of primetrust api.

10PHP

Since Mar 21Pushed 4y agoCompare

[ Source](https://github.com/bsiorg/primetrust-client-laravel)[ Packagist](https://packagist.org/packages/bsiorg/primetrust-client-laravel)[ RSS](/packages/bsiorg-primetrust-client-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

PrimeTrust Client for Laravel
=============================

[](#primetrust-client-for-laravel)

A client implementation of [primetrust](https://developers.primetrust.com) api in Laravel with very beautiful, expressive syntax. You don't need to worry about the behind the scene, just enjoy working with primetrust.

Install
-------

[](#install)

#### Install via Composer

[](#install-via-composer)

```
composer require bsiorg/primetrust-client-laravel

```

Utilities autoloading in Laravel 5.5+. For older versions add the following lines to your `config/app.php`

```
'providers' => [
    ...
    \BsiOrg\PrimeTrust\PrimeTrustServiceProvider::class,
    ...
],

'aliases' => [
    ...
    'PrimeTrust' => \BsiOrg\PrimeTrust\PrimeTrust::class,
    ...
]
```

Usage
-----

[](#usage)

### Setup

[](#setup)

You need to set environment variables to run the primetrust sdk.

```
PRIMETRUST_URL=
PRIMETRUST_USER=
PRIMETRUST_PASS=
```

You can use the whole library with facade like so:

```
use BsiOrg\PrimeTrust\Facades\PrimeTrust;

$pt = PrimeTrust::account()->all();
```

### Resources

[](#resources)

This sdk at that moment support all the resources of primetrust, and you can use any resource after the `PrimeTrust::`

```
PrimeTrust::resource('accounts')->all();
PrimeTrust::accounts()->all();
PrimeTrust::contracts()->all();
PrimeTrust::amlChecks()->all();
PrimeTrust::accountCashTotals ()->all();
```

### Filters

[](#filters)

Heavily inspired by Larvael so all the filters with beautiful, expressive syntax are available in this sdk.

```
PrimeTrust::accounts()
    ->with('contacts')
    ->with('account-cash-totals')
    ->where('name', 'sw', 'Rizi')
    ->latest()
    ->limit(5)
    ->get();
```

#### -&gt;with($resource)

[](#-withresource)

It basically includes any allowed resources available with main resource, in result to get both result in one call.

You can include multiple resources with just method chaining.

#### -&gt;where($key, $operator, $value)

[](#-wherekey-operator-value)

You can filter down your results with the help of all the available operators such as:

- `eq`: Equals (exact match). Used when no operator is specified.
- `gt`: Greater than.
- `gte`: Greater than or equal to.
- `in`: Any item is an exact match. Takes special syntax, so if you wanted something where a status was one of a few, you would pass ?filter\[status in\]=pending,processing.
- `like`: Case insensitive search. Does NOT support wildcards as of right now.
- `lt`: Less than.
- `lte`: Less than or equal to.
- `neq`: NOT equal.
- `nin`: NOT in.
- `nlike`: NOT like.
- `sw`: Starts with. Look for strings that being with filter value. Case insensitive.

```
// example to get all the users who are between 18 and 30
PrimeTrust::contacts()
    ->where('date-of-birth', 'gt', '2002-01-01')
    ->where('date-of-birth', 'lt', '1990-01-01')
    ->limit(10)
    ->orderBy('created-at') // to get younger first
    ->get();
```

#### -&gt;orderBy($column, $order = asc|desc)

[](#-orderbycolumn-order--ascdesc)

You can sort the api request by any column which supported in primetrust api with the help of `orderBy`, `orderByAsc`, `orderByDesc`, `latest()` and `oldest()`.

#### -&gt;limit($pageSize, $pageNumber)

[](#-limitpagesize-pagenumber)

You can narrow down your result to your desire amount or can skip the results and directly go to your desire page.

```
PrimeTrust::contributions()
    ->where('account.id', 'eq', 'XXXX')
    ->limit(5)
    ->latest()
    ->get();
```

Author
------

[](#author)

Mubashir Rasool Razvi (@rizimore)

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity28

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.

### Community

Maintainers

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

---

Top Contributors

[![hamza-siddique1](https://avatars.githubusercontent.com/u/57829074?v=4)](https://github.com/hamza-siddique1 "hamza-siddique1 (1 commits)")

---

Tags

api-clientlaravelprimetrust

### Embed Badge

![Health badge](/badges/bsiorg-primetrust-client-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/bsiorg-primetrust-client-laravel/health.svg)](https://phpackages.com/packages/bsiorg-primetrust-client-laravel)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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