ifnull () in laravel

0

I need to do a join in which I show the values of some fields even if they are null. I try to use the ifnull () but it does not work and I look for another way to make the query

With this I only get the values of the fields that are not null

 $RcTieneNota = Rc::join('nota_pedidos','nota_pedidos.id','=','rcs.idnpedido')
    ->select('idnpedido', 'nota_pedidos.id','estado' , 'rcs.id as idrcs')->get();

I have tried this but it shows me the same result.

DB::Raw('IFNULL( 'tble'.'value' , 0 )')
    
asked by Peta P3t4d0r Zeta 06.02.2018 в 12:51
source

0 answers