/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { session_start(); $ticket_details = App\ticket::where('deleted', '0')->where('id', $id)->first(); $ticket_category = App\ticket_category::all(); $group = new groups(); // get user can add groups $edit_groups = $group->user_can_edit_groups('ticket'); $problems = $this->view_problem($id); return View::make('ticket.ticket_edit', compact('ticket_details', 'ticket_category', 'edit_groups', 'problems')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { session_start(); $cart = new cart(); $group = new groups(); $cart->delete_user_cart(); // remove cart data $cart->add_cart_edit($id); // add sales product to cart unset($_SESSION['form_cart_edit']); $one_sale = $this->view_one_sale($id); $user_can_edit_group = $group->user_can_edit_groups('sales'); return View::make('sale.sales_edit', compact('one_sale', 'user_can_edit_group')); if (isset($_POST['sales'])) { // check if submit button click or not // $sales->edit_sale($_GET['lid']); //edit sales data echo '<script>window.location.href="' . $_SERVER['PHP_SELF'] . '?loc=sales&action=view&alert=successful";</script> '; } else { } }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { session_start(); $account_details = App\account::find($id); $group = new groups(); $edit_group_accounts = $group->user_can_edit_groups('accounts'); // var_dump($account_details); return view::make('account.account_edit', compact('account_details', 'edit_group_accounts')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { session_start(); $call_log_detials = App\call_log::where('deleted', '0')->find($id); $group = new groups(); if ($call_log_detials->call_type == "Sales") { $edit_group = $group->user_can_edit_groups('sales'); $sales_detials = App\sale::where('call_log_id', $id)->where('deleted', '0')->first(); return View::make('call_log.call_log_edit', compact('sales_detials', 'edit_group', 'call_log_detials')); } elseif ($call_log_detials->call_type == "Inquiry") { $edit_group = $group->user_can_edit_groups('inquiry'); $inquiry_details = App\inquiry::where('call_log_id', $id)->first(); return View::make('call_log.call_log_edit', compact('inquiry_details', 'edit_group', 'call_log_detials')); } elseif ($call_log_detials->call_type == "Tickets") { $edit_group = $group->user_can_edit_groups('tickets'); $ticket_detials = App\ticket::where('call_log_id', $id)->where('deleted', '0')->first(); $ticket_cat = App\ticket_category::all(); $problem = new tickets(); $ticket_problems = $problem->view_problem($ticket_detials->id); return View::make('call_log.call_log_edit', compact('ticket_detials', 'edit_group', 'ticket_cat', 'ticket_problems', 'call_log_detials')); } }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { session_start(); $contact = new App\contact(); $account = new App\account(); $group = new groups(); $_SESSION['cid'] = $id; $contact_detial = $contact::find($id); $account_detial = $account::find($contact_detial->account_id); if ($account_detial == NULL) { $account_detial = $contact_detial; } //get contact category detials $contact_category_data = $this->view_c_category(); // get user can add groups $edit_group_contacts = $group->user_can_edit_groups('contacts'); if (isset($_SESSION['contact_report_to'])) { $report_to = $this->viewonecontact($_SESSION['contact_report_to']); } else { $report_to = $this->viewonecontact($contact_detial->contact_report_to); } return View::make('contact.contact_edit', compact('contact_detial', 'account_detial', 'contact_category_data', 'edit_group_contacts', 'report_to')); }