Download the PHP package datpmwork/laravel-auth-queue without Composer
On this page you can find all versions of the php package datpmwork/laravel-auth-queue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download datpmwork/laravel-auth-queue
More information about datpmwork/laravel-auth-queue
Files in datpmwork/laravel-auth-queue
Package laravel-auth-queue
Short Description Preserve the authenticated user context when dispatching Laravel queued jobs.
License MIT
Homepage https://github.com/datpmwork/laravel-auth-queue
Informations about the package laravel-auth-queue
Preserve the authenticated user context when dispatching Laravel queued jobs.
This package preserves the authenticated user context when dispatching Laravel queued jobs, notifications, or event listeners.
It allows you to seamlessly access the authenticated user who originally dispatched the job through Laravel's auth() manager when the job is being handled.
This is particularly useful when you need to maintain user context across asynchronous operations.
Requirements
- PHP ^7.4 | > 8.0
- Laravel 9.x | 10.x | 11.x | 12.x
Support us
You can support this project via GitHub Sponsors.
Installation
You can install the package via composer:
Usage
Add WasAuthenticated
trait to any Job
, Notification
, Listener
which need to access auth
data when the Job was dispatched
Example Job
Example Notification
Example Subscriber
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
- datpmwork
- All Contributors
License
The MIT License (MIT). Please see License File for more information.