コード例 #1
0
 public function dstaixe()
 {
     $taixe = TaiXe::select('taixe_id', 'tentaixe', 'banglaixe', 'ngaysinh', 'sothich')->get()->toArray();
     foreach ($taixe as $key => $value) {
         $myfunction = new MyFunction();
         $arrayxe = $myfunction->laixe($value['banglaixe']);
         array_push($taixe[$key], $arrayxe);
         $socho_xe = TaiXe::find($value['taixe_id'])->xe;
         //dd($socho_xe);
         if ($socho_xe != null) {
             array_push($taixe[$key], $socho_xe->socho_xe);
         }
     }
     //dd($taixe);
     return view('backend.taixe.list', compact('taixe'));
 }