Eloquent\'s where() seems not working when comparing two column values. How to fix it?
where()
Sample code:
->where(\'table_1.name\', \'=\',
Escaping is unnecessary in this case, you can use whereRaw():
whereRaw()
->whereRaw('table_1.name = table_2.name')