Apply fixes from StyleCI
This commit is contained in:

committed by
RafficMohammed

parent
ac7fc33df2
commit
e8f61f16d5
@@ -109,6 +109,7 @@ class SettingsController2 extends Controller
|
||||
try {
|
||||
/* fetch the values of company from company table */
|
||||
$statuss = \DB::table('ticket_status')->get();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.status', compact('statuss'));
|
||||
} catch (Exception $e) {
|
||||
@@ -141,6 +142,7 @@ class SettingsController2 extends Controller
|
||||
}
|
||||
$statuss->sort = Input::get('sort');
|
||||
$statuss->save();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return redirect()->back()->with('success', 'Status has been updated!');
|
||||
} catch (Exception $e) {
|
||||
@@ -164,6 +166,7 @@ class SettingsController2 extends Controller
|
||||
}
|
||||
$statuss->sort = Input::get('sort');
|
||||
$statuss->save();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return redirect()->back()->with('success', 'Status has been created!');
|
||||
// } catch (Exception $ex) {
|
||||
@@ -177,6 +180,7 @@ class SettingsController2 extends Controller
|
||||
if ($id > 5) {
|
||||
/* fetch the values of company from company table */
|
||||
\App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return redirect()->back()->with('success', 'Status has been deleted');
|
||||
} else {
|
||||
@@ -200,6 +204,7 @@ class SettingsController2 extends Controller
|
||||
try {
|
||||
/* fetch the values of company from company table */
|
||||
$companys = $company->whereId('1')->first();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.company', compact('companys'));
|
||||
} catch (Exception $e) {
|
||||
@@ -230,9 +235,11 @@ class SettingsController2 extends Controller
|
||||
if ($request->input('use_logo') == null) {
|
||||
$companys->use_logo = '0';
|
||||
}
|
||||
|
||||
/* Check whether function success or not */
|
||||
try {
|
||||
$companys->fill($request->except('logo'))->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getcompany')->with('success', 'Company Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
@@ -283,6 +290,7 @@ class SettingsController2 extends Controller
|
||||
$departments = $department->get();
|
||||
/* Fetch the values from Timezones table */
|
||||
$timezones = $timezone->get();
|
||||
|
||||
/* Direct to System Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.system', compact('systems', 'departments', 'timezones', 'time', 'date', 'date_time'));
|
||||
} catch (Exception $e) {
|
||||
@@ -308,6 +316,7 @@ class SettingsController2 extends Controller
|
||||
/* fill the values to coompany table */
|
||||
/* Check whether function success or not */
|
||||
$systems->fill($request->input())->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getsystem')->with('success', 'System Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
@@ -335,6 +344,7 @@ class SettingsController2 extends Controller
|
||||
$slas = $sla->get();
|
||||
/* Fetch the values from Help_topic table */
|
||||
$topics = $topic->get();
|
||||
|
||||
/* Direct to Ticket Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.ticket', compact('tickets', 'slas', 'topics', 'priority'));
|
||||
} catch (Exception $e) {
|
||||
@@ -369,6 +379,7 @@ class SettingsController2 extends Controller
|
||||
$tickets->collision_avoid = $request->input('collision_avoid');
|
||||
/* Check whether function success or not */
|
||||
$tickets->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getticket')->with('success', 'Ticket Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
@@ -395,6 +406,7 @@ class SettingsController2 extends Controller
|
||||
$templates = $template->get();
|
||||
/* Fetch the values from Emails table */
|
||||
$emails1 = $email1->get();
|
||||
|
||||
/* Direct to Email Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.email', compact('emails', 'templates', 'emails1'));
|
||||
} catch (Exception $e) {
|
||||
@@ -427,6 +439,7 @@ class SettingsController2 extends Controller
|
||||
$emails->attachment = $request->input('attachment');
|
||||
/* Check whether function success or not */
|
||||
$emails->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getemail')->with('success', 'Email Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
@@ -485,6 +498,7 @@ class SettingsController2 extends Controller
|
||||
$emails->notification_cron = 0;
|
||||
}
|
||||
$emails->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('job-scheduler')->with('success', Lang::get('lang.job-scheduler-success'));
|
||||
} catch (Exception $e) {
|
||||
@@ -556,6 +570,7 @@ class SettingsController2 extends Controller
|
||||
try {
|
||||
/* fetch the values of responder from responder table */
|
||||
$responders = $responder->whereId('1')->first();
|
||||
|
||||
/* Direct to Responder Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.responder', compact('responders'));
|
||||
} catch (Exception $e) {
|
||||
@@ -585,6 +600,7 @@ class SettingsController2 extends Controller
|
||||
/* fill the values to coompany table */
|
||||
/* Check whether function success or not */
|
||||
$responders->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getresponder')->with('success', 'Responder Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
@@ -605,6 +621,7 @@ class SettingsController2 extends Controller
|
||||
try {
|
||||
/* fetch the values of alert from alert table */
|
||||
$alerts = $alert->whereId('1')->first();
|
||||
|
||||
/* Direct to Alert Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.alert', compact('alerts'));
|
||||
} catch (Exception $e) {
|
||||
@@ -673,6 +690,7 @@ class SettingsController2 extends Controller
|
||||
/* fill the values to coompany table */
|
||||
/* Check whether function success or not */
|
||||
$alerts->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getalert')->with('success', 'Alert Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
|
Reference in New Issue
Block a user