/** * Display a listing of the resource. * * @return Response */ public function index($emp_code) { $data_pc = Pcwork::where('cust_code', 'CXXXX')->where('emp_code', $emp_code)->orderBy('work_date', 'asc')->get(); $pc = Pcmast::where('cust_code', 'CXXXX')->where('emp_code', $emp_code)->get(['emp_name']); //dd($pc); return view('sales.pcwork')->with(array('pcwork' => $data_pc, 'emp_code' => $emp_code)); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $delete = Pcmast::where('id', $id)->delete(); $data_pc = array('pc' => Pcmast::where('cust_code', 'CXXXX')->orderBy('emp_code', 'asc')->get(), 'refresh' => true); return view('sales.pc_table')->with($data_pc); }