예제 #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  Request $request
  * @param  int $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     //
     company::find($id)->update(['company' => $request->input('company')]);
     if ($request->ajax()) {
         return response()->json(['mensaje' => 'has Actualizado los datos correctamente']);
     }
     return redirect('configuracion');
 }
예제 #2
0
 public function contestroom()
 {
     //return 1;
     $data['company'] = Company::get()->toArray();
     $data['work_direction'] = Work_direction::get()->toArray();
     $data['year'] = Year::get()->toArray();
     $data['paper'] = Test_paper::get()->toArray();
     //print_r($data);die;
     return view("questions.contestroom", compact("data"));
 }
 public function addcompany(Requests\companyvalidate $request)
 {
     try {
         $input = $request->all();
         $customer = new customer();
         $customer->address = Input::get('address');
         $customer->email = Input::get('email');
         $customer->contact_no = Input::get('telephone_number');
         $customer->name = Input::get('comname');
         $customer->lane1 = Input::get('lane1');
         $customer->lane2 = Input::get('lane2');
         $customer->city = Input::get('city');
         $customer->save();
         $company = new company();
         $company->cus_id = $customer->cus_id;
         $company->save();
         $changelog = new changes_log();
         $changelog->user = '******';
         $changelog->action_type = 'Add Company';
         $changelog->description = $customer->name . ' added as a new company';
         $changelog->save();
         return redirect('/guest_profile/company_list')->with('succ_status', 'Successfully Added');
     } catch (Exception $e) {
         return redirect('/guest_profile/company_list/create')->with(['exception' => 'You cannot add the Company. Please Chack you E-maile and Contact No!']);
     }
 }