Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[12.x] Add a command option for making unique or encrypted jobs #55959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

amirhshokri
Copy link

This PR adds a new command-line option to the make:job Artisan command to support creating unique and encrypted jobs.

This allows developers to quickly scaffold jobs that implement the necessary interfaces or use appropriate traits for handling uniqueness and encryption, improving DX and consistency.

What's Added:

  • --unique option: Adds the ShouldBeUnique interface to the generated job class.
  • --encrypted option: Adds the ShouldBeEncrypted interface to the generated job class.

Why?

In src/Illuminate/Foundation/Console/JobMakeCommand.php, we already have similar logic for the --sync option, which conditionally applies the ShouldQueue interface. This PR extends that idea to support more advanced job features out of the box.

@taylorotwell
Copy link
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions!

@amirhshokri amirhshokri deleted the 12.x-specify-job-interfaces-in-command branch June 9, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.