PHPackages                             diegowazevedo/laravel-database-queue - 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. diegowazevedo/laravel-database-queue

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

diegowazevedo/laravel-database-queue
====================================

0.6.1(9y ago)085MITPHPPHP &gt;=5.3.0

Since Nov 19Pushed 9y ago1 watchersCompare

[ Source](https://github.com/diegowazevedo/laravel-database-queue)[ Packagist](https://packagist.org/packages/diegowazevedo/laravel-database-queue)[ RSS](/packages/diegowazevedo-laravel-database-queue/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (20)Used By (0)

Laravel 4 Database Queue Driver
===============================

[](#laravel-4-database-queue-driver)

Push a function/closure to the Database queue.
----------------------------------------------

[](#push-a-functionclosure-to-the-database-queue)

This is a real queue driver, like beanstalkd or redis one. You need a daemon like supervisor or similar to listen to your queue.

### Install

[](#install)

Add the package to the require section of your composer.json and run `composer update`

```
"diegowazevedo/laravel-database-queue": ">0.5"

```

Add the Service Provider to the providers array in config/app.php

```
'DWA\Queue\DatabaseServiceProvider'

```

I suggest to publish migrations, so they are copied to your regular migrations

```
$ php artisan migrate:publish diegowazevedo/laravel-database-queue

```

And then run migrate

```
$ php artisan migrate

```

I suggest to create the `failed_jobs` table, in this moment, with:

```
$ php artisan queue:failed-table

```

You should now be able to use the database driver in config/queue.php

```
'default' => 'database',

'connections' => array(
    ...
    'database' => array(
        'driver' => 'database',
        'queue' => 'queue-name', // optional, can be null or any string
        'lock_type' => 0, // optional, can be 0, 1 or 2
    ),
    ...
}

```

It work in the same as beanstalkd or redis queue listener.

Listen for new job:

```
$ php artisan queue:listen

```

Concurrency are managed by `status` column in the `queues` table, so you can parallelize your `queue:listen`.

Atomicity of status change are garantee by database transaction, if you are having problems of race condition can You set the option `lock_type` to:

- 'lock\_type' =&gt; 1 // queue system will use sharedLock
- 'lock\_type' =&gt; 2 // queue system will use lockForUpdate

see  for further info.

### Laravel Queue System

[](#laravel-queue-system)

For more info see

#### Thanks

[](#thanks)

Loosely based on

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% 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 ~44 days

Recently: every ~117 days

Total

19

Last Release

3391d ago

### Community

---

Top Contributors

[![davelip](https://avatars.githubusercontent.com/u/946249?v=4)](https://github.com/davelip "davelip (7 commits)")[![furey](https://avatars.githubusercontent.com/u/1914481?v=4)](https://github.com/furey "furey (1 commits)")[![sakoken](https://avatars.githubusercontent.com/u/8756915?v=4)](https://github.com/sakoken "sakoken (1 commits)")

### Embed Badge

![Health badge](/badges/diegowazevedo-laravel-database-queue/health.svg)

```
[![Health](https://phpackages.com/badges/diegowazevedo-laravel-database-queue/health.svg)](https://phpackages.com/packages/diegowazevedo-laravel-database-queue)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[amphp/parser

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2238.8M171](/packages/react-async)

PHPackages © 2026

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