Forked from anonymous/gist:1226bda5334674b0dd0c768e46179bae
Last active
October 21, 2016 13:19
-
-
Save silasrm/743600a18fd78c91dc56fa91fa69d02b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function buscaParceiro(Request $request){ | |
$string = $request->get('pesquisa'); | |
$parceiro = DB::table('usuario') | |
->join('pessoa', 'pessoa.filho_id', '=', 'usuario.id') | |
->where('usuario.filho_type', '=', "'CompraSerrana\Parceiro'") | |
->where('pessoa.nome', 'LIKE', "%$string%") | |
->get(); | |
return view('painel/parceiro/listagem', compact('parceiros')); | |
} | |
?> | |
SQLSTATE[23000]: Integrity constraint violation: 1052 | |
Column 'filho_type' in where clause is ambiguous | |
(SQL: select * from `usuario` inner join `pessoa` on `pessoa`.`nome` LIKE `%peixe%` where `filho_type` = CompraSerrana\Parceiro) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment