Skip to content

Apply Filters During Queue #777

Answered by andrewskm
andrewskm asked this question in Q&A
Jun 14, 2022 · 3 comments · 2 replies
Discussion options

You must be logged in to vote

Ended up solving this by realizing that you can send a request as the 2nd parameter to the for() method.
Placing what I needed to add just in case someone else is doing the same or similar.

In the excel export (using FromQuery):

public function __construct(public $requestQuery = null)
{
    $this->requestQuery = request()->query();
}

public function query()
{
    $request = app(QueryBuilderRequest::class)->merge($this->requestQuery);
    return QueryBuilder::for(User::class, $request);
}

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@siarheipashkevich
Comment options

@andrewskm
Comment options

Answer selected by andrewskm
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants