Apply fixes from StyleCI

This commit is contained in:
StyleCI Bot
2024-01-22 12:27:21 +00:00
committed by RafficMohammed
parent ac7fc33df2
commit e8f61f16d5
36 changed files with 114 additions and 8 deletions

View File

@@ -743,6 +743,7 @@ class ApiController extends Controller
$url = $url.'/api/v1/helpdesk/check-url?api_key='.$this->request->input('api_key').'&token='.\Config::get('app.token'); $url = $url.'/api/v1/helpdesk/check-url?api_key='.$this->request->input('api_key').'&token='.\Config::get('app.token');
$result = $this->CallGetApi($url); $result = $this->CallGetApi($url);
//dd($result); //dd($result);
return response()->json(compact('result')); return response()->json(compact('result'));
} catch (\Exception $ex) { } catch (\Exception $ex) {

View File

@@ -42,6 +42,7 @@ class ApiExceptAuthController extends Controller
$url = $url.'api/v1/helpdesk/check-url'; $url = $url.'api/v1/helpdesk/check-url';
//return $url; //return $url;
$result = $this->CallGetApi($url); $result = $this->CallGetApi($url);
// dd($result); // dd($result);
return response()->json(compact('result')); return response()->json(compact('result'));
} catch (\Exception $ex) { } catch (\Exception $ex) {

View File

@@ -64,6 +64,7 @@ class TokenAuthController extends Controller
} }
$user_id = \Auth::user(); $user_id = \Auth::user();
// if no errors are encountered we can return a JWT // if no errors are encountered we can return a JWT
return response()->json(compact('token', 'user_id')); return response()->json(compact('token', 'user_id'));
} }
@@ -91,6 +92,7 @@ class TokenAuthController extends Controller
return response()->json(compact('error')); return response()->json(compact('error'));
} }
//dd($user); //dd($user);
return response()->json(compact('user')); return response()->json(compact('user'));
} }
@@ -174,8 +176,8 @@ class TokenAuthController extends Controller
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->first(); $password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->first();
if (isset($password_reset_table)) { if (isset($password_reset_table)) {
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]); $password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]);
// $password_reset_table->token = $code; // $password_reset_table->token = $code;
// $password_reset_table->update(['token' => $code]); // $password_reset_table->update(['token' => $code]);
} else { } else {
$create_password_reset = \DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]); $create_password_reset = \DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]);
} }

View File

@@ -235,6 +235,7 @@ class AgentController extends Controller
foreach ($requests as $req) { foreach ($requests as $req) {
DB::insert('insert into team_assign_agent (team_id, agent_id) values (?,?)', [$req, $id]); DB::insert('insert into team_assign_agent (team_id, agent_id) values (?,?)', [$req, $id]);
} }
//Todo For success and failure conditions //Todo For success and failure conditions
try { try {
if ($request->input('country_code') != '' or $request->input('country_code') != null) { if ($request->input('country_code') != '' or $request->input('country_code') != null) {
@@ -304,6 +305,7 @@ class AgentController extends Controller
for ($i = 0; $i < $length; $i++) { for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)]; $randomString .= $characters[rand(0, $charactersLength - 1)];
} }
// return random string // return random string
return $randomString; return $randomString;
} }

View File

@@ -87,6 +87,7 @@ class BanlistController extends Controller
$use->ban = $request->input('ban'); $use->ban = $request->input('ban');
$use->internal_note = $request->input('internal_note'); $use->internal_note = $request->input('internal_note');
$use->save(); $use->save();
// $user->create($request->input())->save(); // $user->create($request->input())->save();
return redirect('banlist')->with('success', Lang::get('lang.email_banned_sucessfully')); return redirect('banlist')->with('success', Lang::get('lang.email_banned_sucessfully'));
} else { } else {

View File

@@ -380,6 +380,7 @@ class EmailsController extends Controller
} }
//dd($ex->getMessage()); //dd($ex->getMessage());
loging('mail-config', $message); loging('mail-config', $message);
//Log::error($ex->getMessage()); //Log::error($ex->getMessage());
return $this->jsonResponse('fails', $message); return $this->jsonResponse('fails', $message);
} }

View File

@@ -196,6 +196,7 @@ class FormController extends Controller
//dd($form); //dd($form);
if ($form) { if ($form) {
$fields = $form->fields(); $fields = $form->fields();
//dd($fields); //dd($fields);
return view('themes.default1.admin.helpdesk.manage.form.edit', compact('form', 'fields', 'select_forms')); return view('themes.default1.admin.helpdesk.manage.form.edit', compact('form', 'fields', 'select_forms'));
} }
@@ -215,6 +216,7 @@ class FormController extends Controller
//dd($form); //dd($form);
if ($form) { if ($form) {
$fields = $form->fields(); $fields = $form->fields();
//dd($fields); //dd($fields);
return view('themes.default1.admin.helpdesk.manage.form.add-child', compact('form', 'fields', 'select_forms')); return view('themes.default1.admin.helpdesk.manage.form.add-child', compact('form', 'fields', 'select_forms'));
} }

View File

@@ -168,9 +168,11 @@ class GroupController extends Controller
//Updating admin_notes field //Updating admin_notes field
$adminNotes = $request->input('admin_notes'); $adminNotes = $request->input('admin_notes');
$var->admin_notes = $adminNotes; $var->admin_notes = $adminNotes;
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$var->save(); $var->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('groups')->with('success', Lang::get('lang.group_updated_successfully')); return redirect('groups')->with('success', Lang::get('lang.group_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -198,9 +200,11 @@ class GroupController extends Controller
} }
$group_assign_department->where('group_id', $id)->delete(); $group_assign_department->where('group_id', $id)->delete();
$groups = $group->whereId($id)->first(); $groups = $group->whereId($id)->first();
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$groups->delete(); $groups->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('groups')->with('success', Lang::get('lang.group_deleted_successfully')); return redirect('groups')->with('success', Lang::get('lang.group_deleted_successfully'));
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -118,6 +118,7 @@ class HelptopicController extends Controller
} }
/* Check whether function success or not */ /* Check whether function success or not */
$topic->fill($request->except('custom_form', 'auto_assign'))->save(); $topic->fill($request->except('custom_form', 'auto_assign'))->save();
// $topics->fill($request->except('custom_form','auto_assign'))->save(); // $topics->fill($request->except('custom_form','auto_assign'))->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_created_successfully')); return redirect('helptopic')->with('success', Lang::get('lang.helptopic_created_successfully'));
@@ -192,6 +193,7 @@ class HelptopicController extends Controller
->where('id', '=', 1) ->where('id', '=', 1)
->update(['help_topic' => $id]); ->update(['help_topic' => $id]);
} }
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_updated_successfully')); return redirect('helptopic')->with('success', Lang::get('lang.helptopic_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -238,9 +240,11 @@ class HelptopicController extends Controller
} }
$message = $ticket.$email; $message = $ticket.$email;
$topics = $topic->whereId($id)->first(); $topics = $topic->whereId($id)->first();
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$topics->delete(); $topics->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_deleted_successfully').$message); return redirect('helptopic')->with('success', Lang::get('lang.helptopic_deleted_successfully').$message);
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -74,6 +74,7 @@ class SettingsController extends Controller
try { try {
/* fetch the values of company from company table */ /* fetch the values of company from company table */
$companys = $company->whereId('1')->first(); $companys = $company->whereId('1')->first();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return view('themes.default1.admin.helpdesk.settings.company', compact('companys')); return view('themes.default1.admin.helpdesk.settings.company', compact('companys'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -104,9 +105,11 @@ class SettingsController extends Controller
if ($request->input('use_logo') == null) { if ($request->input('use_logo') == null) {
$companys->use_logo = '0'; $companys->use_logo = '0';
} }
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$companys->fill($request->except('logo'))->save(); $companys->fill($request->except('logo'))->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getcompany')->with('success', Lang::get('lang.company_updated_successfully')); return redirect('getcompany')->with('success', Lang::get('lang.company_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -167,6 +170,7 @@ class SettingsController extends Controller
$email_mandatory = $common_settings->select('status') $email_mandatory = $common_settings->select('status')
->where('option_name', '=', 'email_mandatory') ->where('option_name', '=', 'email_mandatory')
->first(); ->first();
/* Direct to System Settings Page */ /* Direct to System Settings Page */
return view('themes.default1.admin.helpdesk.settings.system', compact('systems', 'departments', 'timezones', 'time', 'date', 'date_time', 'common_setting', 'send_otp', 'email_mandatory')); return view('themes.default1.admin.helpdesk.settings.system', compact('systems', 'departments', 'timezones', 'time', 'date', 'date_time', 'common_setting', 'send_otp', 'email_mandatory'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -215,6 +219,7 @@ class SettingsController extends Controller
$sett->status = $itil; $sett->status = $itil;
$sett->save(); $sett->save();
} }
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getsystem')->with('success', Lang::get('lang.system_updated_successfully')); return redirect('getsystem')->with('success', Lang::get('lang.system_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -242,6 +247,7 @@ class SettingsController extends Controller
$slas = $sla->get(); $slas = $sla->get();
/* Fetch the values from Help_topic table */ /* Fetch the values from Help_topic table */
$topics = $topic->get(); $topics = $topic->get();
/* Direct to Ticket Settings Page */ /* Direct to Ticket Settings Page */
return view('themes.default1.admin.helpdesk.settings.ticket', compact('tickets', 'slas', 'topics', 'priority')); return view('themes.default1.admin.helpdesk.settings.ticket', compact('tickets', 'slas', 'topics', 'priority'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -276,6 +282,7 @@ class SettingsController extends Controller
$tickets->collision_avoid = $request->input('collision_avoid'); $tickets->collision_avoid = $request->input('collision_avoid');
/* Check whether function success or not */ /* Check whether function success or not */
$tickets->save(); $tickets->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getticket')->with('success', Lang::get('lang.ticket_updated_successfully')); return redirect('getticket')->with('success', Lang::get('lang.ticket_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -302,6 +309,7 @@ class SettingsController extends Controller
$templates = $template->get(); $templates = $template->get();
/* Fetch the values from Emails table */ /* Fetch the values from Emails table */
$emails1 = $email1->get(); $emails1 = $email1->get();
/* Direct to Email Settings Page */ /* Direct to Email Settings Page */
return view('themes.default1.admin.helpdesk.settings.email', compact('emails', 'templates', 'emails1')); return view('themes.default1.admin.helpdesk.settings.email', compact('emails', 'templates', 'emails1'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -334,6 +342,7 @@ class SettingsController extends Controller
$emails->attachment = $request->input('attachment'); $emails->attachment = $request->input('attachment');
/* Check whether function success or not */ /* Check whether function success or not */
$emails->save(); $emails->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getemail')->with('success', Lang::get('lang.email_updated_successfully')); return redirect('getemail')->with('success', Lang::get('lang.email_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -435,6 +444,7 @@ class SettingsController extends Controller
} }
$work->save(); $work->save();
$this->saveConditions(); $this->saveConditions();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('job-scheduler')->with('success', Lang::get('lang.job-scheduler-success')); return redirect('job-scheduler')->with('success', Lang::get('lang.job-scheduler-success'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -455,6 +465,7 @@ class SettingsController extends Controller
try { try {
/* fetch the values of responder from responder table */ /* fetch the values of responder from responder table */
$responders = $responder->whereId('1')->first(); $responders = $responder->whereId('1')->first();
/* Direct to Responder Settings Page */ /* Direct to Responder Settings Page */
return view('themes.default1.admin.helpdesk.settings.responder', compact('responders')); return view('themes.default1.admin.helpdesk.settings.responder', compact('responders'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -484,6 +495,7 @@ class SettingsController extends Controller
/* fill the values to coompany table */ /* fill the values to coompany table */
/* Check whether function success or not */ /* Check whether function success or not */
$responders->save(); $responders->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getresponder')->with('success', Lang::get('lang.auto_response_updated_successfully')); return redirect('getresponder')->with('success', Lang::get('lang.auto_response_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -504,6 +516,7 @@ class SettingsController extends Controller
try { try {
/* fetch the values of alert from alert table */ /* fetch the values of alert from alert table */
$alerts = $alert->whereId('1')->first(); $alerts = $alert->whereId('1')->first();
/* Direct to Alert Settings Page */ /* Direct to Alert Settings Page */
return view('themes.default1.admin.helpdesk.settings.alert', compact('alerts')); return view('themes.default1.admin.helpdesk.settings.alert', compact('alerts'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -572,6 +585,7 @@ class SettingsController extends Controller
/* fill the values to coompany table */ /* fill the values to coompany table */
/* Check whether function success or not */ /* Check whether function success or not */
$alerts->save(); $alerts->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('getalert')->with('success', Lang::get('lang.alert_&_notices_updated_successfully')); return redirect('getalert')->with('success', Lang::get('lang.alert_&_notices_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -615,6 +629,7 @@ class SettingsController extends Controller
try { try {
/* fetch the values of company from company table */ /* fetch the values of company from company table */
$statuss = \DB::table('ticket_status')->get(); $statuss = \DB::table('ticket_status')->get();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return view('themes.default1.admin.helpdesk.settings.status', compact('statuss')); return view('themes.default1.admin.helpdesk.settings.status', compact('statuss'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -635,6 +650,7 @@ class SettingsController extends Controller
try { try {
/* fetch the values of company from company table */ /* fetch the values of company from company table */
$status = \DB::table('ticket_status')->where('id', '=', $id)->first(); $status = \DB::table('ticket_status')->where('id', '=', $id)->first();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return view('themes.default1.admin.helpdesk.settings.status-edit', compact('status')); return view('themes.default1.admin.helpdesk.settings.status-edit', compact('status'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -667,6 +683,7 @@ class SettingsController extends Controller
} }
$statuss->sort = $request->input('sort'); $statuss->sort = $request->input('sort');
$statuss->save(); $statuss->save();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return redirect()->back()->with('success', Lang::get('lang.status_has_been_updated_successfully')); return redirect()->back()->with('success', Lang::get('lang.status_has_been_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -698,6 +715,7 @@ class SettingsController extends Controller
} }
$statuss->sort = $request->input('sort'); $statuss->sort = $request->input('sort');
$statuss->save(); $statuss->save();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return redirect()->back()->with('success', Lang::get('lang.status_has_been_created_successfully')); return redirect()->back()->with('success', Lang::get('lang.status_has_been_created_successfully'));
} catch (Exception $ex) { } catch (Exception $ex) {
@@ -718,6 +736,7 @@ class SettingsController extends Controller
if ($id > 5) { if ($id > 5) {
/* fetch the values of company from company table */ /* fetch the values of company from company table */
\App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete(); \App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete();
/* Direct to Company Settings Page */ /* Direct to Company Settings Page */
return redirect()->back()->with('success', Lang::get('lang.status_has_been_deleted')); return redirect()->back()->with('success', Lang::get('lang.status_has_been_deleted'));
} else { } else {

View File

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

View File

@@ -45,6 +45,7 @@ class SlaController extends Controller
try { try {
/* Declare a Variable $slas to store all Values From Sla_plan Table */ /* Declare a Variable $slas to store all Values From Sla_plan Table */
$slas = $sla->get(); $slas = $sla->get();
/* Listing the values From Sla_plan Table */ /* Listing the values From Sla_plan Table */
return view('themes.default1.admin.helpdesk.manage.sla.index', compact('slas')); return view('themes.default1.admin.helpdesk.manage.sla.index', compact('slas'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -81,6 +82,7 @@ class SlaController extends Controller
/* Fill the request values to Sla_plan Table */ /* Fill the request values to Sla_plan Table */
/* Check whether function success or not */ /* Check whether function success or not */
$sla->fill($request->input())->save(); $sla->fill($request->input())->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('sla')->with('success', Lang::get('lang.sla_plan_created_successfully')); return redirect('sla')->with('success', Lang::get('lang.sla_plan_created_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -196,9 +198,11 @@ class SlaController extends Controller
$message = $ticket.$dept.$topic; $message = $ticket.$dept.$topic;
/* Delete a perticular field from the database by delete() using Id */ /* Delete a perticular field from the database by delete() using Id */
$slas = Sla_plan::whereId($id)->first(); $slas = Sla_plan::whereId($id)->first();
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$slas->delete(); $slas->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('sla')->with('success', Lang::get('lang.sla_plan_deleted_successfully').$message); return redirect('sla')->with('success', Lang::get('lang.sla_plan_deleted_successfully').$message);
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -150,6 +150,7 @@ class TeamController extends Controller
$users = DB::table('team_assign_agent')->select('team_assign_agent.id', 'team_assign_agent.team_id', 'users.user_name', 'users.first_name', 'users.last_name', 'users.active', 'users.assign_group', 'users.primary_dpt', 'users.role') $users = DB::table('team_assign_agent')->select('team_assign_agent.id', 'team_assign_agent.team_id', 'users.user_name', 'users.first_name', 'users.last_name', 'users.active', 'users.assign_group', 'users.primary_dpt', 'users.role')
->join('users', 'users.id', '=', 'team_assign_agent.agent_id') ->join('users', 'users.id', '=', 'team_assign_agent.agent_id')
->where('team_assign_agent.team_id', '=', $id); ->where('team_assign_agent.team_id', '=', $id);
// ->get(); // ->get();
// dd($users); // dd($users);
return \Datatable::query($users) return \Datatable::query($users)
@@ -219,6 +220,7 @@ class TeamController extends Controller
} }
// dd($a_id); // dd($a_id);
$user = $user->whereIn('id', $a_id)->where('active', '=', 1)->orderBy('first_name')->get(); $user = $user->whereIn('id', $a_id)->where('active', '=', 1)->orderBy('first_name')->get();
// dd($user); // dd($user);
return view('themes.default1.admin.helpdesk.agent.teams.edit', compact('agent_id', 'user', 'teams')); return view('themes.default1.admin.helpdesk.agent.teams.edit', compact('agent_id', 'user', 'teams'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -250,10 +252,12 @@ class TeamController extends Controller
$alert = $request->input('assign_alert'); $alert = $request->input('assign_alert');
$teams->assign_alert = $alert; $teams->assign_alert = $alert;
$teams->save(); //saving check box $teams->save(); //saving check box
//updating whole field //updating whole field
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
$teams->fill($request->except('team_lead'))->save(); $teams->fill($request->except('team_lead'))->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('teams')->with('success', Lang::get('lang.teams_updated_successfully')); return redirect('teams')->with('success', Lang::get('lang.teams_updated_successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -279,6 +283,7 @@ class TeamController extends Controller
$tickets = DB::table('tickets')->where('team_id', '=', $id)->update(['team_id' => null]); $tickets = DB::table('tickets')->where('team_id', '=', $id)->update(['team_id' => null]);
/* Check whether function success or not */ /* Check whether function success or not */
$teams->delete(); $teams->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('teams')->with('success', Lang::get('lang.teams_deleted_successfully')); return redirect('teams')->with('success', Lang::get('lang.teams_deleted_successfully'));
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -32,6 +32,7 @@ class ThreadController extends Controller
$threads = $thread->get(); $threads = $thread->get();
/* get the values of priority from Priority Table */ /* get the values of priority from Priority Table */
$priorities = $priority->get(); $priorities = $priority->get();
/* Direct to view page */ /* Direct to view page */
return view('themes.default1.admin.helpdesk.tickets.ticket', compact('threads', 'priorities')); return view('themes.default1.admin.helpdesk.tickets.ticket', compact('threads', 'priorities'));
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -18,6 +18,7 @@ class UrlSettingController extends Controller
$url = $request->url(); $url = $request->url();
$www = $this->checkWWW($url); $www = $this->checkWWW($url);
$https = $this->checkHTTP($url); $https = $this->checkHTTP($url);
//dd($www, $https); //dd($www, $https);
try { try {
return view('themes.default1.admin.helpdesk.settings.url.settings', compact('www', 'https')); return view('themes.default1.admin.helpdesk.settings.url.settings', compact('www', 'https'));

View File

@@ -155,6 +155,7 @@ class CannedController extends Controller
/* delete the selected field */ /* delete the selected field */
/* Check whether function success or not */ /* Check whether function success or not */
$canned->delete(); $canned->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect()->route('canned.list')->with('success', Lang::get('lang.canned_response_deleted')); return redirect()->route('canned.list')->with('success', Lang::get('lang.canned_response_deleted'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -180,6 +181,7 @@ class CannedController extends Controller
} else { } else {
$msg = ''; $msg = '';
} }
// returning the canned response in JSON format // returning the canned response in JSON format
return \Response::json($msg); return \Response::json($msg);
} }

View File

@@ -576,6 +576,7 @@ class FilterController extends Controller
$query->whereIn('tickets.team_id', $teams) $query->whereIn('tickets.team_id', $teams)
->orWhereIn('tickets.assigned_to', $users); ->orWhereIn('tickets.assigned_to', $users);
}); });
// dd($table->toSql()); // dd($table->toSql());
return $table; return $table;
} }
@@ -899,6 +900,7 @@ class FilterController extends Controller
} else { } else {
$table = $table->where('tickets.id', '=', null); $table = $table->where('tickets.id', '=', null);
} }
// dd($table->toSql()); // dd($table->toSql());
return $table; return $table;
} }

View File

@@ -51,6 +51,7 @@ class FilterControllerOld extends Controller
if ((is_array($tags) && count($tags) > 0) || (is_array($labels) && count($labels) > 0)) { if ((is_array($tags) && count($tags) > 0) || (is_array($labels) && count($labels) > 0)) {
$render = true; $render = true;
} }
// return \Datatables::of($table)->make(); // return \Datatables::of($table)->make();
return \Ttable::getTable($table); return \Ttable::getTable($table);
} }

View File

@@ -25,6 +25,7 @@ class ImapMail extends Mailbox
{ {
//dd($this->getImapStream()); //dd($this->getImapStream());
$mailsIds = imap_search($this->getImapStream(), $criteria, SE_UID); $mailsIds = imap_search($this->getImapStream(), $criteria, SE_UID);
//dd($mailsIds); //dd($mailsIds);
return $mailsIds ? $mailsIds : []; return $mailsIds ? $mailsIds : [];
} }

View File

@@ -178,6 +178,7 @@ class OrganizationController extends Controller
try { try {
/* select the field by id */ /* select the field by id */
$orgs = $org->whereId($id)->first(); $orgs = $org->whereId($id)->first();
/* To view page */ /* To view page */
return view('themes.default1.agent.helpdesk.organization.show', compact('orgs')); return view('themes.default1.agent.helpdesk.organization.show', compact('orgs'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -198,6 +199,7 @@ class OrganizationController extends Controller
try { try {
/* select the field by id */ /* select the field by id */
$orgs = $org->whereId($id)->first(); $orgs = $org->whereId($id)->first();
/* To view page */ /* To view page */
return view('themes.default1.agent.helpdesk.organization.edit', compact('orgs')); return view('themes.default1.agent.helpdesk.organization.edit', compact('orgs'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -254,6 +256,7 @@ class OrganizationController extends Controller
/* Delete the field selected from the table */ /* Delete the field selected from the table */
/* Check whether function success or not */ /* Check whether function success or not */
$orgs->delete(); $orgs->delete();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('organizations')->with('success', Lang::get('lang.organization_deleted_successfully')); return redirect('organizations')->with('success', Lang::get('lang.organization_deleted_successfully'));
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -501,6 +501,7 @@ class TicketController extends Controller
$ticket = Tickets::where('tickets.id', '=', $id)->first(); $ticket = Tickets::where('tickets.id', '=', $id)->first();
$html = view('themes.default1.agent.helpdesk.ticket.pdf', compact('id', 'ticket', 'tickets'))->render(); $html = view('themes.default1.agent.helpdesk.ticket.pdf', compact('id', 'ticket', 'tickets'))->render();
$html1 = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'); $html1 = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
/** /**
* This statement throws error with php7.1. * This statement throws error with php7.1.
* *
@@ -2457,6 +2458,7 @@ class TicketController extends Controller
$ticket = Tickets::where('id', $thread->ticket_id)->first(); $ticket = Tickets::where('id', $thread->ticket_id)->first();
$html = view('themes.default1.agent.helpdesk.ticket.thread-pdf', compact('thread', 'system', 'company', 'ticket'))->render(); $html = view('themes.default1.agent.helpdesk.ticket.thread-pdf', compact('thread', 'system', 'company', 'ticket'))->render();
$html1 = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'); $html1 = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
/** /**
* This statement throws error with php7.1. * This statement throws error with php7.1.
* *

View File

@@ -201,6 +201,7 @@ class TicketWorkflowController extends Controller
} elseif ($condition == 'ends') { } elseif ($condition == 'ends') {
$return = $this->checkEnds($statement, $to_check); $return = $this->checkEnds($statement, $to_check);
} }
// elseif($condition == 'match') { // elseif($condition == 'match') {
// //
// } elseif($condition == 'not_match') { // } elseif($condition == 'not_match') {

View File

@@ -149,6 +149,7 @@ class UserController extends Controller
$query->orWhere('country_code', 'LIKE', '%'.$search.'%'); $query->orWhere('country_code', 'LIKE', '%'.$search.'%');
}); });
} }
// displaying list of users with chumper datatables // displaying list of users with chumper datatables
// return \Datatable::collection(User::where('role', "!=", "admin")->get()) // return \Datatable::collection(User::where('role', "!=", "admin")->get())
return \Yajra\DataTables\Facades\DataTables::of($users) return \Yajra\DataTables\Facades\DataTables::of($users)
@@ -338,6 +339,7 @@ class UserController extends Controller
return redirect('user')->with('success', Lang::get('lang.User-Created-Successfully')); return redirect('user')->with('success', Lang::get('lang.User-Created-Successfully'));
} }
// $user->save(); // $user->save();
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('user')->with('success', Lang::get('lang.User-Created-Successfully')); return redirect('user')->with('success', Lang::get('lang.User-Created-Successfully'));
@@ -676,6 +678,7 @@ class UserController extends Controller
$user = new User(); $user = new User();
/* select the field where id = $id(request Id) */ /* select the field where id = $id(request Id) */
$users = $user->whereId($id)->first(); $users = $user->whereId($id)->first();
/* Update the value by selected field */ /* Update the value by selected field */
/* Check whether function success or not */ /* Check whether function success or not */
try { try {
@@ -697,6 +700,7 @@ class UserController extends Controller
$this->storeUserOrgRelation($id, $orgid); $this->storeUserOrgRelation($id, $orgid);
} }
/* redirect to Index page with Success Message */ /* redirect to Index page with Success Message */
return redirect('user')->with('success', Lang::get('lang.User-profile-Updated-Successfully')); return redirect('user')->with('success', Lang::get('lang.User-profile-Updated-Successfully'));
} catch (Exception $e) { } catch (Exception $e) {
@@ -932,6 +936,7 @@ class UserController extends Controller
$user_org->org_id = $org->id; $user_org->org_id = $org->id;
$user_org->user_id = $id; $user_org->user_id = $id;
$user_org->save(); $user_org->save();
// for success return 0 // for success return 0
return 0; return 0;
} }
@@ -956,6 +961,7 @@ class UserController extends Controller
for ($i = 0; $i < $length; $i++) { for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)]; $randomString .= $characters[rand(0, $charactersLength - 1)];
} }
// return random string // return random string
return $randomString; return $randomString;
} }
@@ -1061,6 +1067,7 @@ class UserController extends Controller
if (Hash::check(Input::get('otp'), $otp->otp)) { if (Hash::check(Input::get('otp'), $otp->otp)) {
Otp::where('user_id', '=', Input::get('u_id')) Otp::where('user_id', '=', Input::get('u_id'))
->update(['otp' => '']); ->update(['otp' => '']);
// User::where('id', '=', $user->id) // User::where('id', '=', $user->id)
// ->update(['active' => 1]); // ->update(['active' => 1]);
// $this->openTicketAfterVerification($user->id); // $this->openTicketAfterVerification($user->id);

View File

@@ -68,6 +68,7 @@ class ArticleController extends Controller
->select('id', 'name', 'description', 'publish_time', 'slug') ->select('id', 'name', 'description', 'publish_time', 'slug')
->orderBy('publish_time', 'desc') ->orderBy('publish_time', 'desc')
->get(); ->get();
// returns chumper datatable // returns chumper datatable
return Datatable::Collection($articles) return Datatable::Collection($articles)
@@ -136,6 +137,7 @@ class ArticleController extends Controller
{ {
/* get the attributes of the category */ /* get the attributes of the category */
$category = $category->pluck('id', 'name'); $category = $category->pluck('id', 'name');
/* get the create page */ /* get the create page */
try { try {
return view('themes.default1.agent.kb.article.create', compact('category')); return view('themes.default1.agent.kb.article.create', compact('category'));
@@ -169,6 +171,7 @@ class ArticleController extends Controller
foreach ($requests as $req) { foreach ($requests as $req) {
DB::insert('insert into kb_article_relationship (category_id, article_id) values (?,?)', [$req, $id]); DB::insert('insert into kb_article_relationship (category_id, article_id) values (?,?)', [$req, $id]);
} }
/* insert the values to the article table */ /* insert the values to the article table */
try { try {
$article->fill($request->except('slug'))->save(); $article->fill($request->except('slug'))->save();
@@ -203,6 +206,7 @@ class ArticleController extends Controller
/* get the selected article and display it at edit page */ /* get the selected article and display it at edit page */
/* Get the selected article with id */ /* Get the selected article with id */
$article = $article->whereId($id)->first(); $article = $article->whereId($id)->first();
/* send to the edit page */ /* send to the edit page */
try { try {
return view('themes.default1.agent.kb.article.edit', compact('assign', 'article', 'category')); return view('themes.default1.agent.kb.article.edit', compact('assign', 'article', 'category'));
@@ -244,6 +248,7 @@ class ArticleController extends Controller
foreach ($requests as $req) { foreach ($requests as $req) {
DB::insert('insert into kb_article_relationship (category_id, article_id) values (?,?)', [$req, $id]); DB::insert('insert into kb_article_relationship (category_id, article_id) values (?,?)', [$req, $id]);
} }
/* update the value to the table */ /* update the value to the table */
try { try {
$article->fill($request->all())->save(); $article->fill($request->all())->save();

View File

@@ -123,6 +123,7 @@ class CategoryController extends Controller
{ {
/* Get the all attributes in the category model */ /* Get the all attributes in the category model */
$category = $category->pluck('name', 'id')->toArray(); $category = $category->pluck('name', 'id')->toArray();
/* get the view page to create new category with all attributes /* get the view page to create new category with all attributes
of category model */ of category model */
try { try {
@@ -146,6 +147,7 @@ class CategoryController extends Controller
$sl = $request->input('name'); $sl = $request->input('name');
$slug = Str::slug($sl, '-'); $slug = Str::slug($sl, '-');
$category->slug = $slug; $category->slug = $slug;
// send success message to index page // send success message to index page
try { try {
$category->fill($request->input())->save(); $category->fill($request->input())->save();
@@ -169,6 +171,7 @@ class CategoryController extends Controller
/* get the atributes of the category model whose id == $id */ /* get the atributes of the category model whose id == $id */
$category = Category::whereId($id)->first(); $category = Category::whereId($id)->first();
$categories = Category::pluck('name', 'id')->toArray(); $categories = Category::pluck('name', 'id')->toArray();
/* get the Edit page the selected category via id */ /* get the Edit page the selected category via id */
return view('themes.default1.agent.kb.category.edit', compact('category', 'categories')); return view('themes.default1.agent.kb.category.edit', compact('category', 'categories'));
} }
@@ -188,6 +191,7 @@ class CategoryController extends Controller
$category = Category::where('id', $id)->first(); $category = Category::where('id', $id)->first();
$sl = $request->input('name'); $sl = $request->input('name');
$slug = Str::slug($sl, '-'); $slug = Str::slug($sl, '-');
/* update the values at the table via model according with the request */ /* update the values at the table via model according with the request */
//redirct to index page with success message //redirct to index page with success message
try { try {
@@ -218,6 +222,7 @@ class CategoryController extends Controller
} else { } else {
/* delete the category selected, id == $id */ /* delete the category selected, id == $id */
$category = $category->whereId($id)->first(); $category = $category->whereId($id)->first();
// redirect to index with success message // redirect to index with success message
try { try {
$category->delete(); $category->delete();

View File

@@ -56,6 +56,7 @@ class SettingsController extends Controller
/* get the setting where the id == 1 */ /* get the setting where the id == 1 */
$settings = $settings->whereId('1')->first(); $settings = $settings->whereId('1')->first();
$time = $time->get(); $time = $time->get();
//$date = $date->get(); //$date = $date->get();
return view('themes.default1.agent.kb.settings.settings', compact('date', 'settings', 'time')); return view('themes.default1.agent.kb.settings.settings', compact('date', 'settings', 'time'));
} }

View File

@@ -77,6 +77,7 @@ class AuthController extends Controller
} }
//dd(\Config::get('services')); //dd(\Config::get('services'));
$s = Socialite::driver($provider)->redirect(); $s = Socialite::driver($provider)->redirect();
//dd('dscd'); //dd('dscd');
return $s; return $s;
} }
@@ -114,6 +115,7 @@ class AuthController extends Controller
} }
Auth::login($user); Auth::login($user);
} }
//after login redirecting to home page //after login redirecting to home page
return redirect('/'); return redirect('/');
} catch (\Exception $ex) { } catch (\Exception $ex) {

View File

@@ -58,8 +58,8 @@ class ForgotPasswordController extends Controller
$password_reset_table = DB::table('password_resets')->where('email', '=', $user->email)->first(); $password_reset_table = DB::table('password_resets')->where('email', '=', $user->email)->first();
if (isset($password_reset_table)) { if (isset($password_reset_table)) {
$password_reset_table = DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]); $password_reset_table = DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]);
// $password_reset_table->token = $code; // $password_reset_table->token = $code;
// $password_reset_table->update(['token' => $code]); // $password_reset_table->update(['token' => $code]);
} else { } else {
$create_password_reset = DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]); $create_password_reset = DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]);
} }

View File

@@ -63,8 +63,8 @@ class PasswordController extends Controller
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->first(); $password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->first();
if (isset($password_reset_table)) { if (isset($password_reset_table)) {
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]); $password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]);
// $password_reset_table->token = $code; // $password_reset_table->token = $code;
// $password_reset_table->update(['token' => $code]); // $password_reset_table->update(['token' => $code]);
} else { } else {
$create_password_reset = \DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]); $create_password_reset = \DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]);
} }

View File

@@ -249,6 +249,7 @@ class FormController extends Controller
// } // }
// } // }
} }
// dd($result); // dd($result);
return Redirect::back()->with('success', Lang::get('lang.Ticket-has-been-created-successfully-your-ticket-number-is').' '.$result[0].'. '); return Redirect::back()->with('success', Lang::get('lang.Ticket-has-been-created-successfully-your-ticket-number-is').' '.$result[0].'. ');
} else { } else {

View File

@@ -209,6 +209,7 @@ class GuestController extends Controller
$tickets = $tickets->where('user_id', '=', $user_id)->first(); $tickets = $tickets->where('user_id', '=', $user_id)->first();
//dd($ticket); //dd($ticket);
$thread = $thread->where('ticket_id', $tickets->id)->first(); $thread = $thread->where('ticket_id', $tickets->id)->first();
//dd($thread); //dd($thread);
// $tickets = $tickets->whereId($id)->first(); // $tickets = $tickets->whereId($id)->first();
return view('themes.default1.client.guest-user.view_ticket', compact('thread', 'tickets')); return view('themes.default1.client.guest-user.view_ticket', compact('thread', 'tickets'));
@@ -424,6 +425,7 @@ class GuestController extends Controller
if (Hash::check(Input::get('otp'), $otp->otp)) { if (Hash::check(Input::get('otp'), $otp->otp)) {
Otp::where('user_id', '=', Input::get('u_id')) Otp::where('user_id', '=', Input::get('u_id'))
->update(['otp' => '']); ->update(['otp' => '']);
// User::where('id', '=', $user->id) // User::where('id', '=', $user->id)
// ->update(['active' => 1]); // ->update(['active' => 1]);
// $this->openTicketAfterVerification($user->id); // $this->openTicketAfterVerification($user->id);

View File

@@ -344,8 +344,8 @@ class UnAuthController extends Controller
// app()->setLocale($lang); // app()->setLocale($lang);
\Cache::forever('language', $lang); \Cache::forever('language', $lang);
// dd(Cache::get('language')); // dd(Cache::get('language'));
// dd() // dd()
} else { } else {
return false; return false;
} }

View File

@@ -141,6 +141,7 @@ class UserController extends Controller
/* from whole attribute pick the article_id */ /* from whole attribute pick the article_id */
$article_id = $all->pluck('article_id'); $article_id = $all->pluck('article_id');
$categorys = $category->get(); $categorys = $category->get();
/* direct to view with $article_id */ /* direct to view with $article_id */
return view('themes.default1.client.kb.article-list.category', compact('all', 'id', 'categorys', 'article_id')); return view('themes.default1.client.kb.article-list.category', compact('all', 'id', 'categorys', 'article_id'));
} }

View File

@@ -15,6 +15,7 @@ class ExcelController extends Controller
if (count($data) == 0) { if (count($data) == 0) {
throw new Exception('No data'); throw new Exception('No data');
} }
//dd(Excel::download(new UserExport($data), $filename.'.'.'xls')); //dd(Excel::download(new UserExport($data), $filename.'.'.'xls'));
return Excel::download(new UserExport($data), $filename.'.'.'xlsx'); return Excel::download(new UserExport($data), $filename.'.'.'xlsx');
} }

View File

@@ -553,6 +553,7 @@ class SettingsController extends Controller
$attributes[$key]['author'] = $field['author']; $attributes[$key]['author'] = $field['author'];
} }
} }
//dd($attributes); //dd($attributes);
return $attributes; return $attributes;
} }

View File

@@ -169,6 +169,7 @@ class UpgradeController extends Controller
} }
} }
echo '</ul>'; echo '</ul>';
//Artisan::call('migrate', ['--force' => true]); //Artisan::call('migrate', ['--force' => true]);
return true; return true;
} catch (Exception $ex) { } catch (Exception $ex) {
@@ -397,6 +398,7 @@ class UpgradeController extends Controller
try { try {
if (Utility::getFileVersion() > Utility::getDatabaseVersion()) { if (Utility::getFileVersion() > Utility::getDatabaseVersion()) {
$url = url('database-upgrade'); $url = url('database-upgrade');
//$string = "Your Database is outdated please upgrade <a href=$url>Now !</a>"; //$string = "Your Database is outdated please upgrade <a href=$url>Now !</a>";
return view('themes.default1.update.database', compact('url')); return view('themes.default1.update.database', compact('url'));
} else { } else {