searchable icon indicating copy to clipboard operation
searchable copied to clipboard

Duplicate Columns

Open Justicea83 opened this issue 6 years ago • 1 comments

ambiguous columns I dont even want that column involved in the searches 'columns' => [ 'students.fname' => 10, 'students.lname' => 10, 'students.mname' => 10, 'students.school_id'=>0, 'transactions.school_id'=>0, ], 'joins' => [ 'students' => ['transactions.student_id','students.id'], ], it gives errors

Justicea83 avatar Feb 07 '19 19:02 Justicea83

The problem is probably on another query of yours, not searchable. E.g if the ambiguous column is school_id:

$transactions = Transaction::where('school_id', $school_id)->search($search);

You could do as such:

$transactions = Transaction::where('transactions.school_id', $school_id)->search($search);

ricardo avatar Jan 22 '22 07:01 ricardo