PHPackages                             technopers/laravel-trackable-jobs - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. technopers/laravel-trackable-jobs

ActiveLibrary[Queues &amp; Workers](/categories/queues)

technopers/laravel-trackable-jobs
=================================

v2.0(3y ago)053MITPHPPHP ^8.1

Since Dec 28Pushed 3y agoCompare

[ Source](https://github.com/technopers/laravel-trackable-jobs)[ Packagist](https://packagist.org/packages/technopers/laravel-trackable-jobs)[ Docs](https://github.com/technopers/laravel-trackable-jobs)[ RSS](/packages/technopers-laravel-trackable-jobs/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

Laravel Trackable Jobs
======================

[](#laravel-trackable-jobs)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e15fe7876868116559f44b152120f14908ad26253f379ebc12a247080bdacba4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746563686e6f706572732f6c61726176656c2d747261636b61626c652d6a6f62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/technopers/laravel-trackable-jobs)[![Total Downloads](https://camo.githubusercontent.com/25cb15e0dddba8877bbb11109d508f9c1e770edcd77e0f1c24ed44c0c415885f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746563686e6f706572732f6c61726176656c2d747261636b61626c652d6a6f62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/technopers/laravel-trackable-jobs)[![GitHub Actions](https://github.com/technopers/laravel-trackable-jobs/actions/workflows/main.yml/badge.svg)](https://github.com/technopers/laravel-trackable-jobs/actions/workflows/main.yml/badge.svg)

Laravel trackable jobs is simple yet affective library for tracking background processes by Model entry (row).

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

[](#installation)

You can install the package via composer:

```
composer require technopers/laravel-trackable-jobs
```

Usage
-----

[](#usage)

You have a process called compress user profile picture. Which is related to specific user. So your job will be

```
class CompressUserProfilePicture {

}
```

This job can easily be tracked by each user, You can have status of this process, What you need to do is that.

### Just add trait called "Trackable" and pass model object

[](#just-add-trait-called-trackable-and-pass-model-object)

```
class CompressUserProfilePicture
{
    use Trackable {
        Trackable::__construct as __trackableConstruct;
    };

    public $user;

    public function __construct($user)
    {
        $this->user = $user;
        $this->__trackableConstruct($user);
    }
}
```

### Find processes by user

[](#find-processes-by-user)

#### Get processes by User

[](#get-processes-by-user)

For that add, Just add trait called "HasTrackedJobs"

```
use HasTrackedJobs;
```

It will add relations and give you finding methods like,

```
public function trackedJobs(): MorphMany
{
    return $this->morphMany(TrackedJob::class, 'trackable');
}

public function finishedJobs(): MorphMany
{
    return $this->morphMany(TrackedJob::class, 'trackable')
        ->where('status', TrackedJobStatuses::STATUS_FINISHED);
}

public function failedJobs(): MorphMany
{
    return $this->morphMany(TrackedJob::class, 'trackable')
        ->where('status', TrackedJobStatuses::STATUS_FAILED);
}

public function runningJobs(): MorphMany
{
    return $this->morphMany(TrackedJob::class, 'trackable')
        ->where('status', TrackedJobStatuses::STATUS_STARTED);
}

public function pendingJobs(): MorphMany
{
    return $this->morphMany(TrackedJob::class, 'trackable')
        ->where('status', TrackedJobStatuses::STATUS_QUEUED);
}
```

#### Also, if you have single job by each model

[](#also-if-you-have-single-job-by-each-model)

For that add, Just add trait called **"HasTrackedJob"** not "HasTrackedJobs"

```
use HasTrackedJob;
```

Which has methods like,

```
public function trackedJob(): MorphOne
{
    return $this->morphOne(TrackedJob::class, 'trackable');
}

public function finishedJobs(): MorphOne
{
    return $this->morphOne(TrackedJob::class, 'trackable')
        ->where('status', TrackedJobStatuses::STATUS_FINISHED);
}

public function failedJobs(): MorphOne
{
    return $this->morphOne(TrackedJob::class, 'trackable')
        ->where('status', TrackedJobStatuses::STATUS_FAILED);
}

public function runningJobs(): MorphOne
{
    return $this->morphOne(TrackedJob::class, 'trackable')
        ->where('status', TrackedJobStatuses::STATUS_STARTED);
}

public function pendingJobs(): MorphOne
{
    return $this->morphOne(TrackedJob::class, 'trackable')
        ->where('status', TrackedJobStatuses::STATUS_QUEUED);
}
```

Usage
-----

[](#usage-1)

### Fetch processes

[](#fetch-processes)

```
$userProcesses = $user->trackedJob()->get();
```

or

```
$userProcesses = $user->trackedJob;
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Hardik Modha](https://github.com/technopers)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

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

Total

4

Last Release

1196d ago

Major Versions

v1.1 → v2.02023-03-27

PHP version history (2 changes)v1.0-betaPHP ^8.0

v2.0PHP ^8.1

### Community

Maintainers

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

---

Top Contributors

[![technoper-hardik](https://avatars.githubusercontent.com/u/114377492?v=4)](https://github.com/technoper-hardik "technoper-hardik (13 commits)")

---

Tags

technoperslaravel-trackable-jobs

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/technopers-laravel-trackable-jobs/health.svg)

```
[![Health](https://phpackages.com/badges/technopers-laravel-trackable-jobs/health.svg)](https://phpackages.com/packages/technopers-laravel-trackable-jobs)
```

###  Alternatives

[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k9.0M69](/packages/spatie-laravel-responsecache)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

811334.1k3](/packages/defstudio-telegraph)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M167](/packages/spatie-laravel-health)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.0k](/packages/simplestats-io-laravel-client)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.2k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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