I managed to do it this way:
$pedidos = Pedido::with('itensPedido')->whereIn('status_pedido', array('recebido', 'pendente'))->get();
return response()->json($pedidos);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community