R
R
Romi2021-07-09 02:22:02
Laravel
Romi, 2021-07-09 02:22:02

Why is Auth::user() available inside handle() of Job, while Request is unavailable?

It's kind of illogical.

And yes, I'm using 'sync' (for testing) - maybe that's why Auth::user() is available?

In general, who can advise:

- I use sessions to store and transfer some data.

But inside Job - Request, and, therefore, sessions - are not available.

Rewriting logic without sessions is reluctant :D

Or will I have to if I want to use Jobs?

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
N, 2021-07-09
@romicohen

And yes, I'm using 'sync' (for testing) - maybe that's why Auth::user() is available?

Yes.
In general, who can advise:
- I use sessions to store and transfer some data.
But inside Job - Request, and, therefore, sessions - are not available.
Rewriting logic without sessions is reluctant :D
Or will I have to if I want to use Jobs?

Anyway.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question