Questions tagged as 'querybuilder'

2
answers

Problems with Laravel Query Builder

I'm having the following problem, when trying to implement a query with joins, in the query builder: My Query (pure SQL): SELECT COUNT(*) as total, orgao.sigla AS sigla_org_uni FROM protocolo INNER JOIN procedimento p ON protocolo.id_pro...
asked by 25.01.2018 / 14:40
0
answers

Group By | Relationship Many To Many Laravel 5

I'm developing an application in Laravel 5 where I have the tables employees , companies , exams , employee_exams and their respective fields as migration below: :: Table Companies public function up() { Schem...
asked by 14.06.2017 / 19:33
0
answers

Laravel Query Builder returning duplicate values?

I have the following problem, I have a select using leftJoin , plus this is returning duplicate records, the database is not duplicated and when I run leftJoin it works. Follow SQL Tabela processo -----------------------...
asked by 09.04.2017 / 17:02
1
answer

Column not found using ALIAS in laravel

I'm having a problem while accessing a column in the laravel query builder, the following code works in the Sql Workbench. Vendas::selectRaw('if(faturamento.Codfaturamento is null, vendas.totalvenda, faturamento.valor) AS vlrFatura') -...
asked by 03.10.2018 / 21:54