Skip to content

Commit

Permalink
Add Doc: ShouldBeEncrypted Interface to Queue (#8904)
Browse files Browse the repository at this point in the history
* Add: ShouldBeEncrypted Queue Docummentation

* formatting

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
devajmeireles and taylorotwell committed Jul 10, 2023
1 parent 34d8cf8 commit ccec1c3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions queues.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [Generating Job Classes](#generating-job-classes)
- [Class Structure](#class-structure)
- [Unique Jobs](#unique-jobs)
- [Encrypted Jobs](#encrypted-jobs)
- [Job Middleware](#job-middleware)
- [Rate Limiting](#rate-limiting)
- [Preventing Job Overlaps](#preventing-job-overlaps)
Expand Down Expand Up @@ -338,6 +339,21 @@ Behind the scenes, when a `ShouldBeUnique` job is dispatched, Laravel attempts t
> **Note**
> If you only need to limit the concurrent processing of a job, use the [`WithoutOverlapping`](/docs/{{version}}/queues#preventing-job-overlaps) job middleware instead.
<a name="encrypted-jobs"></a>
### Encrypted Jobs

Laravel allows you to ensure the privacy and integrity of a job's data via [encryption](/docs/{{version}}/encryption). To get started, simply add the `ShouldBeEncrypted` interface to the job class. Once this interface has been added to the class, Laravel will automatically encrypt your job before pushing it onto a queue:

<?php

use Illuminate\Contracts\Queue\ShouldBeEncrypted;
use Illuminate\Contracts\Queue\ShouldQueue;

class UpdateSearchIndex implements ShouldQueue, ShouldBeEncrypted
{
// ...
}

<a name="job-middleware"></a>
## Job Middleware

Expand Down

0 comments on commit ccec1c3

Please sign in to comment.