@@ -74,6 +74,7 @@ public function getcompany(Company $company)
7474 try {
7575 /* fetch the values of company from company table */
7676 $ companys = $ company ->whereId ('1 ' )->first ();
77+
7778 /* Direct to Company Settings Page */
7879 return view ('themes.default1.admin.helpdesk.settings.company ' , compact ('companys ' ));
7980 } catch (Exception $ e ) {
@@ -104,9 +105,11 @@ public function postcompany($id, Company $company, CompanyRequest $request)
104105 if ($ request ->input ('use_logo ' ) == null ) {
105106 $ companys ->use_logo = '0 ' ;
106107 }
108+
107109 /* Check whether function success or not */
108110 try {
109111 $ companys ->fill ($ request ->except ('logo ' ))->save ();
112+
110113 /* redirect to Index page with Success Message */
111114 return redirect ('getcompany ' )->with ('success ' , Lang::get ('lang.company_updated_successfully ' ));
112115 } catch (Exception $ e ) {
@@ -167,6 +170,7 @@ public function getsystem(System $system, Department $department, Timezones $tim
167170 $ email_mandatory = $ common_settings ->select ('status ' )
168171 ->where ('option_name ' , '= ' , 'email_mandatory ' )
169172 ->first ();
173+
170174 /* Direct to System Settings Page */
171175 return view ('themes.default1.admin.helpdesk.settings.system ' , compact ('systems ' , 'departments ' , 'timezones ' , 'time ' , 'date ' , 'date_time ' , 'common_setting ' , 'send_otp ' , 'email_mandatory ' ));
172176 } catch (Exception $ e ) {
@@ -215,6 +219,7 @@ public function postsystem($id, System $system, SystemRequest $request)
215219 $ sett ->status = $ itil ;
216220 $ sett ->save ();
217221 }
222+
218223 /* redirect to Index page with Success Message */
219224 return redirect ('getsystem ' )->with ('success ' , Lang::get ('lang.system_updated_successfully ' ));
220225 } catch (Exception $ e ) {
@@ -242,6 +247,7 @@ public function getticket(Ticket $ticket, Sla_plan $sla, Help_topic $topic, Tick
242247 $ slas = $ sla ->get ();
243248 /* Fetch the values from Help_topic table */
244249 $ topics = $ topic ->get ();
250+
245251 /* Direct to Ticket Settings Page */
246252 return view ('themes.default1.admin.helpdesk.settings.ticket ' , compact ('tickets ' , 'slas ' , 'topics ' , 'priority ' ));
247253 } catch (Exception $ e ) {
@@ -276,6 +282,7 @@ public function postticket($id, Ticket $ticket, Request $request)
276282 $ tickets ->collision_avoid = $ request ->input ('collision_avoid ' );
277283 /* Check whether function success or not */
278284 $ tickets ->save ();
285+
279286 /* redirect to Index page with Success Message */
280287 return redirect ('getticket ' )->with ('success ' , Lang::get ('lang.ticket_updated_successfully ' ));
281288 } catch (Exception $ e ) {
@@ -302,6 +309,7 @@ public function getemail(Email $email, Template $template, Emails $email1)
302309 $ templates = $ template ->get ();
303310 /* Fetch the values from Emails table */
304311 $ emails1 = $ email1 ->get ();
312+
305313 /* Direct to Email Settings Page */
306314 return view ('themes.default1.admin.helpdesk.settings.email ' , compact ('emails ' , 'templates ' , 'emails1 ' ));
307315 } catch (Exception $ e ) {
@@ -334,6 +342,7 @@ public function postemail($id, Email $email, EmailRequest $request)
334342 $ emails ->attachment = $ request ->input ('attachment ' );
335343 /* Check whether function success or not */
336344 $ emails ->save ();
345+
337346 /* redirect to Index page with Success Message */
338347 return redirect ('getemail ' )->with ('success ' , Lang::get ('lang.email_updated_successfully ' ));
339348 } catch (Exception $ e ) {
@@ -435,6 +444,7 @@ public function postSchedular(Email $email, Template $template, Emails $email1,
435444 }
436445 $ work ->save ();
437446 $ this ->saveConditions ();
447+
438448 /* redirect to Index page with Success Message */
439449 return redirect ('job-scheduler ' )->with ('success ' , Lang::get ('lang.job-scheduler-success ' ));
440450 } catch (Exception $ e ) {
@@ -455,6 +465,7 @@ public function getresponder(Responder $responder)
455465 try {
456466 /* fetch the values of responder from responder table */
457467 $ responders = $ responder ->whereId ('1 ' )->first ();
468+
458469 /* Direct to Responder Settings Page */
459470 return view ('themes.default1.admin.helpdesk.settings.responder ' , compact ('responders ' ));
460471 } catch (Exception $ e ) {
@@ -484,6 +495,7 @@ public function postresponder(Responder $responder, Request $request)
484495 /* fill the values to coompany table */
485496 /* Check whether function success or not */
486497 $ responders ->save ();
498+
487499 /* redirect to Index page with Success Message */
488500 return redirect ('getresponder ' )->with ('success ' , Lang::get ('lang.auto_response_updated_successfully ' ));
489501 } catch (Exception $ e ) {
@@ -504,6 +516,7 @@ public function getalert(Alert $alert)
504516 try {
505517 /* fetch the values of alert from alert table */
506518 $ alerts = $ alert ->whereId ('1 ' )->first ();
519+
507520 /* Direct to Alert Settings Page */
508521 return view ('themes.default1.admin.helpdesk.settings.alert ' , compact ('alerts ' ));
509522 } catch (Exception $ e ) {
@@ -572,6 +585,7 @@ public function postalert($id, Alert $alert, Request $request)
572585 /* fill the values to coompany table */
573586 /* Check whether function success or not */
574587 $ alerts ->save ();
588+
575589 /* redirect to Index page with Success Message */
576590 return redirect ('getalert ' )->with ('success ' , Lang::get ('lang.alert_&_notices_updated_successfully ' ));
577591 } catch (Exception $ e ) {
@@ -615,6 +629,7 @@ public function getStatuses()
615629 try {
616630 /* fetch the values of company from company table */
617631 $ statuss = \DB ::table ('ticket_status ' )->get ();
632+
618633 /* Direct to Company Settings Page */
619634 return view ('themes.default1.admin.helpdesk.settings.status ' , compact ('statuss ' ));
620635 } catch (Exception $ e ) {
@@ -635,6 +650,7 @@ public function getEditStatuses($id)
635650 try {
636651 /* fetch the values of company from company table */
637652 $ status = \DB ::table ('ticket_status ' )->where ('id ' , '= ' , $ id )->first ();
653+
638654 /* Direct to Company Settings Page */
639655 return view ('themes.default1.admin.helpdesk.settings.status-edit ' , compact ('status ' ));
640656 } catch (Exception $ e ) {
@@ -667,6 +683,7 @@ public function editStatuses($id, StatusRequest $request)
667683 }
668684 $ statuss ->sort = $ request ->input ('sort ' );
669685 $ statuss ->save ();
686+
670687 /* Direct to Company Settings Page */
671688 return redirect ()->back ()->with ('success ' , Lang::get ('lang.status_has_been_updated_successfully ' ));
672689 } catch (Exception $ e ) {
@@ -698,6 +715,7 @@ public function createStatuses(\App\Model\helpdesk\Ticket\Ticket_Status $statuss
698715 }
699716 $ statuss ->sort = $ request ->input ('sort ' );
700717 $ statuss ->save ();
718+
701719 /* Direct to Company Settings Page */
702720 return redirect ()->back ()->with ('success ' , Lang::get ('lang.status_has_been_created_successfully ' ));
703721 } catch (Exception $ ex ) {
@@ -718,6 +736,7 @@ public function deleteStatuses($id)
718736 if ($ id > 5 ) {
719737 /* fetch the values of company from company table */
720738 \App \Model \helpdesk \Ticket \Ticket_Status::whereId ($ id )->delete ();
739+
721740 /* Direct to Company Settings Page */
722741 return redirect ()->back ()->with ('success ' , Lang::get ('lang.status_has_been_deleted ' ));
723742 } else {
0 commit comments