Is there any way to use the request without controller #1450
Answered
by
iammrsea
farshadfahimi
asked this question in
Help
-
right now I have a class called class PostController extends Controller {
async index({ request }) {
const query = Post.where('id', '>', 1);
const grid = await new Grid(query);
}
} I like the grid class work just with query and can access the request on that for sort and do some other query on that class Grid {
constructor(query){
this.query = query;
}
process() {
// create query by request and apply filters on it
// apply sort by request
}
} is there any way to use |
Beta Was this translation helpful? Give feedback.
Answered by
iammrsea
Aug 13, 2020
Replies: 1 comment
-
Your question is not clear enough, but lemme try pointing out few things.
const grid = new Grid(query,request)
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
farshadfahimi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your question is not clear enough, but lemme try pointing out few things.