PHPackages                             schoolpalm/queued-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. schoolpalm/queued-jobs

ActiveLibrary

schoolpalm/queued-jobs
======================

A Laravel queue infrastructure package that preserves application execution context when dispatching queued jobs.

1.0.0(today)10MITPHPPHP ^8.1

Since Jul 28Pushed todayCompare

[ Source](https://github.com/codeparl/queued-jobs)[ Packagist](https://packagist.org/packages/schoolpalm/queued-jobs)[ RSS](/packages/schoolpalm-queued-jobs/feed)WikiDiscussions master Synced today

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

SchoolPalm Queued Jobs
======================

[](#schoolpalm-queued-jobs)

[![Latest Version on Packagist](https://camo.githubusercontent.com/94ffb1bf4df95e502e50fd8fcbcc6eaa197c37f0f06f68ce4a12d3817b3726fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7363686f6f6c70616c6d2f7175657565642d6a6f62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/schoolpalm/queued-jobs)[![Total Downloads](https://camo.githubusercontent.com/ccccd3aaecef9f68d4fe05573095e0cfdb5a0128f435a0fa96fde0d2284dda50/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7363686f6f6c70616c6d2f7175657565642d6a6f62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/schoolpalm/queued-jobs)[![Tests](https://github.com/schoolpalm/queued-jobs/actions/workflows/tests.yml/badge.svg)](https://github.com/schoolpalm/queued-jobs/actions/workflows/tests.yml)

A Laravel queue infrastructure package that preserves application execution context (tenant, school, user, module) when dispatching and processing queued jobs. Designed for multi-tenant and multi-school Laravel applications.

Why?
----

[](#why)

In multi-tenant or multi-school applications, queued jobs often need access to the same context (tenant, school, user, module) that was present when the job was originally dispatched. Without context propagation, each job would need to manually resolve this information, leading to duplicated code and potential inconsistencies.

This package provides a clean, extensible way to automatically capture and restore the application execution context when dispatching and processing queued jobs.

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

[](#installation)

```
composer require schoolpalm/queued-jobs
```

### Publish Configuration

[](#publish-configuration)

```
php artisan vendor:publish --tag=queued-jobs-config
```

### Run Migrations

[](#run-migrations)

```
php artisan migrate
```

Quick Start
-----------

[](#quick-start)

### 1. Create a Context-Aware Job

[](#1-create-a-context-aware-job)

Extend `ContextAwareJob`:

```
