public function viewchanges() { $changes_log = changes_log::all(); return view('Profile_Management.Guest_Profile_Changes_Log', compact('changes_log')); }
public function addtravel(Requests\travelvalidate $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('name'); $customer->lane1 = Input::get('lane1'); $customer->lane2 = Input::get('lane2'); $customer->city = Input::get('city'); $customer->save(); $travel = new travel(); $travel->cus_id = $customer->cus_id; $travel->save(); $changelog = new changes_log(); $changelog->user = '******'; $changelog->action_type = 'Add Travel Agent'; $changelog->description = 'Customer ' . $customer->name . ' added as a travel agent'; $changelog->save(); return redirect('/guest_profile/travel_agent_list')->with('succ_status', 'Successfully Added'); } catch (Exception $e) { return redirect('/guest_profile/travel_agent_list/create')->with(['exception' => 'You cannot add the Travel Agent. Please Chack you E-maile and Contact No !']); } }