Answer the question
In order to leave comments, you need to log in
How to pass parameters for table sorting when join?
In a Laravel project, I get data from two tables with a query.
$tasks = new TaskModel();
$query= $tasks->join('user_models', 'user_models.id', '=', 'task_models.userId');
$itemsArray = $query->sortable()->paginate(3,['user_models.name', 'user_models.email', 'task_models.task','task_models.status']);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question