I want to send a custom data in my queues and want to catch this data before action running.
The best possibility for me would be to send a header value, so I could use getallheaders()
to read this data, but I did read and don't found this possibility.
Since it isn't possible send header
, how can I read data before async back execute?
Update
I have multiple databases, because of that I have problem with Queueable
properties.
I don't have the default connection:
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
Otherwise I have:
'connections' => [
'database1' => [//...],
'database2' => [//...],
]
My project work fine, I can do migrations and everything without problem. But how I haven't a "default" database, I need to set him on load, so my problem in queue objects is Because I don't know which database to choose.
To know which database to choose I need to know by queue.