PHPackages                             jalameta/jps-support - 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. jalameta/jps-support

AbandonedArchivedLibrary

jalameta/jps-support
====================

v0.1.16(5y ago)13.4k2[3 issues](https://github.com/jalameta/jps-support/issues)[1 PRs](https://github.com/jalameta/jps-support/pulls)MITPHP

Since Jan 3Pushed 5y ago2 watchersCompare

[ Source](https://github.com/jalameta/jps-support)[ Packagist](https://packagist.org/packages/jalameta/jps-support)[ RSS](/packages/jalameta-jps-support/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (15)Used By (0)

JPS Support
-----------

[](#jps--support)

JPS Support is a set of tools that will improve your application development productivity. This package has 3 focus tools consider Bus, Database and Caching.

> Requirements : Laravel or Lumen &gt;= 5.6

Getting Started
---------------

[](#getting-started)

### Installing

[](#installing)

`composer require jalameta/jps-support`

### Features

[](#features)

#### 1. Bus

[](#1-bus)

JPS Support Bus providing the class for Laravel Job. Our guide is separate business logic from the controller. However, separating business logic into a Job can ease your application development process, it reduce the time consume on writing duplicated code. We encourage our developers to think the abstraction of business logic. One business logic can be breakdown into several use cases that could be used again in another business logic. How to use :

All you need is extends the BaseJob and implement the method `run()` stubs, then handle the job inside the run method. The method needs a boolean return type for indicating the job is running successfully.

##### Basic Usage

[](#basic-usage)

```
use App\Bus\BaseJob;

class MakePayment extends BaseJob
{
    /**
     * Run the actual command process.
     *
     * @return mixed
     */
    public function run()
    {
        $payment = new Payment();
        $payment->total = $this->request->input('total');
        $payment->method = $this->request->input('method');
        $payment->user()->associate(auth()->user());

        return $payment->save();
    }
}

```

From the example above, you can access the request directly from the `request` attribute. The request attribute is from the original request combined with the array input in a class constructor.

##### Register callback

[](#register-callback)

```
use Jalameta\Support\Bus\BaseJob;

class MakePayment extends BaseJob
{
    /**
    * @var Payment
    */
    public $payment;

    /**
     * Run the actual command process.
     *
     * @return mixed
     */
    public function run()
    {
        // Callbacks are running when the job
        // running successfully, based on the return value of run() method
        $this->onSuccess(function () {
            dispatch_now(new GenerateInvoice($this->payment))
        });

        $this->payment = new Payment();
        $this->payment->total = $this->request->input('total');
        $this->payment->method = $this->request->input('method');
        $this->payment->user()->associate(auth()->user());

        return $this->payment->save();
    }
}

```

Available callbacks are `onIdle`, `onRunning`, `onSuccess`, and `onFailed`

##### Aborting Job

[](#aborting-job)

Occasionally you need to cancel the job before it finishes. You can register the `onAbort` callback and invoke `$this->abort()` method

#### 2. Composite Key

[](#2-composite-key)

It is a trait helper if you have a table with a composite key. Directly use `HasCompositeKeys` trait inside the Eloquent model. It reduces boilerplate when using a composite key for updating an Eloquent model.

##### Basic Usage

[](#basic-usage-1)

```
use Jalameta\Support\Database\Eloquent\HasCompositeKeys;

class Reserve extends Model
{
    use HasCompositeKeys;
}

```

#### 3. UUID as primary key

[](#3-uuid-as-primary-key)

```
As the composite key, this is the trait helper too. This will set the UUID key automatically for you. Prequities you need is define the primary key of the table to the Eloquent model. Don't forget to use the `UuidAsPrimaryKey` trait into your Eloquent model.

```

##### Basic Usage

[](#basic-usage-2)

```
use Jalameta\Support\Database\Eloquent\UuidAsPrimaryKey;

class User extends Authenticable
{
    use UuidAsPrimaryKey;

    protected $primaryKey = 'uuid';
}

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

Recently: every ~45 days

Total

14

Last Release

2024d ago

Major Versions

v0.1.13 → 2.x-dev2020-10-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bca066a038d018921641b2d7134764d18f23b761b08bdbe1c9819f4d92dceed?d=identicon)[veelasky](/maintainers/veelasky)

---

Top Contributors

[![rendyananta](https://avatars.githubusercontent.com/u/17928929?v=4)](https://github.com/rendyananta "rendyananta (4 commits)")[![realreef](https://avatars.githubusercontent.com/u/11408142?v=4)](https://github.com/realreef "realreef (1 commits)")

---

Tags

hacktoberfestlaravel

### Embed Badge

![Health badge](/badges/jalameta-jps-support/health.svg)

```
[![Health](https://phpackages.com/badges/jalameta-jps-support/health.svg)](https://phpackages.com/packages/jalameta-jps-support)
```

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M106](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[jerome/filterable

Streamline dynamic Eloquent query filtering with seamless API request integration and advanced caching strategies.

19226.1k](/packages/jerome-filterable)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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