PHPackages                             ulasoft/laravel-unique-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. ulasoft/laravel-unique-queue

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

ulasoft/laravel-unique-queue
============================

Laravel queue connection that prevents identical jobs from being queued

1.3.0(5y ago)0100[1 PRs](https://github.com/ulasoft/laravel-unique-queue/pulls)MITPHPPHP ~7.1

Since Mar 29Pushed 5y agoCompare

[ Source](https://github.com/ulasoft/laravel-unique-queue)[ Packagist](https://packagist.org/packages/ulasoft/laravel-unique-queue)[ Docs](http://github.com/mlntn/laravel-unique-queue)[ RSS](/packages/ulasoft-laravel-unique-queue/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

⚠️ **DEPRECATED**:

[Unique jobs have been implemented in laravel/framework](https://github.com/laravel/framework/releases/tag/v8.14.0). Please use the official implementation in Laravel 8.14.0 or higher. No further updates will be made to this repository and it will be archived in the future.

Laravel Unique Queue
====================

[](#laravel-unique-queue)

This redis queue driver works just like the standard Laravel redis queue driver, however, it prevents the same job from being queued multiple times.

Requirements
------------

[](#requirements)

Needs PHP &gt;= 7.1 to be installed.

Requires `illuminate/redis` and `illuminate/queue`, both `"~5.7"`, `"~6"` or `"~7"`

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

[](#installation)

### Require via Composer

[](#require-via-composer)

```
composer require mlntn/laravel-unique-queue

```

### Configure

[](#configure)

Create a new connection in `config/queue.php`

```
return [
    // ...
    'connections' => [
        'my_unique_queue_connection_name' => [
            'driver'      => 'unique',
            'connection'  => 'default',
            'queue'       => env('UNIQUE_QUEUE_NAME', 'my_unique_queue_name'),
            'retry_after' => 90,
        ],
        //...
    ]
];

```

Implementation
--------------

[](#implementation)

### Implement a uniquely-queueable job

[](#implement-a-uniquely-queueable-job)

Your job should use the UniquelyQueueable trait and have the getUniqueIdentifier method:

```
