コード例 #1
0
 public function carDetails()
 {
     $sum = 0;
     $label = '';
     $custid = Input::get('customerId');
     $custcar = DB::table('tblCustCar')->join('tblCustomer', 'tblCustCar.strCCCust', '=', 'tblCustomer.strCustId')->join('tblCarModel', 'tblCustCar.strCCModel', '=', 'tblCarModel.strCarModelId')->join('tblCarType', 'tblCarModel.strCMType', '=', 'tblCarType.strCarTypeId')->join('tblCarBrand', 'tblCarModel.strCMBrand', '=', 'tblCarBrand.strCarBrandId')->select('tblCustCar.*', 'tblCarModel.strCarModelDesc', 'tblCustomer.strCustFName', 'tblCustomer.strCustMInit', 'tblCustomer.strCustLName', 'tblCarType.strCarTypeName', 'tblCarBrand.strCarBrandDesc')->get();
     $carmodel = MCarModel::all();
     return View::make('custcarMaintenance')->with('custcars', $custcar)->with('custid', $custid)->with('carmodels', $carmodel);
 }
コード例 #2
0
 public function maintenanceCustomer()
 {
     $ids = DB::table('tblCustomer')->select('strCustId')->orderBy('created_at', 'desc')->orderBy('strCustId', 'desc')->take(1)->get();
     $ID = $ids["0"]->strCustId;
     $newID = $this->smart($ID);
     $cust = MCustomer::all();
     $carmodel = MCarModel::all();
     return View::make('customerMaintenance')->with('customers', $cust)->with('carmodel', $carmodel)->with('newID', $newID);
 }
コード例 #3
0
ファイル: CarController.php プロジェクト: carwashSAD/carwash1
 public function updateCarmodel()
 {
     $id = Input::get('car_model_id_edit');
     $model = MCarModel::find($id);
     $model->strCarModelDesc = Input::get('car_model_name_edit');
     $model->strCMBrand = Input::get('carbrand_edit');
     $model->strCMType = Input::get('cartype_edit');
     $model->save();
     return Redirect::to('/CarModel');
 }