I have this eloquent model query
public function getemployee(){
$id = $_POST['id'];
$employees = mot_users::where("branch_no", $id)->lists('user_no', 'lastname', 'firstname');
return response()->json(['success' => true, 'employees' => $employees]);
}
the problem is this "->lists();" can only handle 2 columns which sent as a json response (seen through console, only 2 selected columns out of 3 is sent). How can I send 3 columns or more than 2 columns in the "->list()" or is there any alternative eloquent model query other than using "->list()" if its impossible?