In fact this eloquent query has a specific join that I want to modify it .
I'm thinking to get the final eloquent request then make my modification and use it !
(...)
dd($employeeList->toSql()); // here I can see the final raw sql
$employeeList = $employeeList->paginate($limit);
return response()->json([
"employeeList" => $employeeList
], 200);
@GodziLaravel I am not sure I follow... if you display it in the Controller using dd, then code execution dies? You can register a listen on the DB class before executing the query so the pagination limits and offsets are included.
And what do you mean to modify a specific join; can't you just modify the Eloquent query? Maybe you need to share the full Eloquent query and explain what you want to modify and why?