 public function Empenhos(Request $request) {     $query = DB::table('empenho as emp')             ->select('emp.nrEmpenho as a',DB::raw("DATE_FORMAT(emp.date, '%d/%m/%Y') as b"))             ->orderby('emp.nrEmpenho');      if ($request->dateini) $query->where('emp.date', '>=', $request->dateini);     if ($request->datefim) $query->where('emp.date', '>=', $request->dateini)