/** * Show the deptinprogress ticket list page * @return type response */ public function deptinprogress($id) { $dept = Department::where('name', '=', $id)->first(); if (Auth::user()->role == 'agent') { if (Auth::user()->primary_dpt == $dept->id) { return view('themes.default1.agent.helpdesk.dept-ticket.inprogress', compact('id')); } else { return redirect()->back()->with('fails', 'Unauthorised!'); } } else { return view('themes.default1.agent.helpdesk.dept-ticket.inprogress', compact('id')); } }
/** * Posted form * @param type Request $request * @param type User $user */ public function postedForm(User $user, ClientRequest $request, Ticket $ticket_settings, Ticket_source $ticket_source) { $form_extras = $request->except('Name', 'Phone', 'Email', 'Subject', 'Details', 'helptopic', '_wysihtml5_mode', '_token'); $name = $request->input('Name'); $phone = $request->input('Phone'); $email = $request->input('Email'); $subject = $request->input('Subject'); $details = $request->input('Details'); $System = System::where('id', '=', 1)->first(); $departments = Department::where('id', '=', $System->department)->first(); $department = $departments->id; $status = $ticket_settings->first()->status; $helptopic = $ticket_settings->first()->help_topic; $sla = $ticket_settings->first()->sla; $priority = $ticket_settings->first()->priority; $source = $ticket_source->where('name', '=', 'web')->first(); $collaborator = null; $assignto = null; if ($this->TicketController->create_user($email, $name, $subject, $details, $phone, $helptopic, $sla, $priority, $source->id, $collaborator, $department, $assignto, $form_extras)) { return Redirect::route('guest.getform')->with('success', 'Ticket Created Successfully'); } }