Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 10 and PHP 8.2 #8277

Open
wants to merge 7 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 1 addition & 2 deletions .idea/community.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 53 additions & 3 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/Api/v1/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ public function checkUrl()

$url = $url.'/api/v1/helpdesk/check-url?api_key='.$this->request->input('api_key').'&token='.\Config::get('app.token');
$result = $this->CallGetApi($url);

//dd($result);
return response()->json(compact('result'));
} catch (\Exception $ex) {
Expand Down
1 change: 1 addition & 0 deletions app/Api/v1/ApiExceptAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function checkUrl()
$url = $url.'api/v1/helpdesk/check-url';
//return $url;
$result = $this->CallGetApi($url);

// dd($result);
return response()->json(compact('result'));
} catch (\Exception $ex) {
Expand Down
6 changes: 4 additions & 2 deletions app/Api/v1/TokenAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function authenticate(Request $request)
}

$user_id = \Auth::user();

// if no errors are encountered we can return a JWT
return response()->json(compact('token', 'user_id'));
}
Expand Down Expand Up @@ -91,6 +92,7 @@ public function getAuthenticatedUser()

return response()->json(compact('error'));
}

//dd($user);
return response()->json(compact('user'));
}
Expand Down Expand Up @@ -174,8 +176,8 @@ public function forgotPassword(Request $request)
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->first();
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->token = $code;
// $password_reset_table->update(['token' => $code]);
// $password_reset_table->token = $code;
// $password_reset_table->update(['token' => $code]);
} else {
$create_password_reset = \DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]);
}
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Controllers/Admin/helpdesk/AgentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ public function update($id, User $user, AgentUpdate $request, Assign_team_agent
foreach ($requests as $req) {
DB::insert('insert into team_assign_agent (team_id, agent_id) values (?,?)', [$req, $id]);
}

//Todo For success and failure conditions
try {
if ($request->input('country_code') != '' or $request->input('country_code') != null) {
Expand Down Expand Up @@ -304,6 +305,7 @@ public function generateRandomString($length = 10)
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}

// return random string
return $randomString;
}
Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/Admin/helpdesk/BanlistController.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function store(BanRequest $request, User $user)
$use->ban = $request->input('ban');
$use->internal_note = $request->input('internal_note');
$use->save();

// $user->create($request->input())->save();
return redirect('banlist')->with('success', Lang::get('lang.email_banned_sucessfully'));
} else {
Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/Admin/helpdesk/EmailsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ public function validatingEmailSettingsUpdate($id, MailRequest $request)
}
//dd($ex->getMessage());
loging('mail-config', $message);

//Log::error($ex->getMessage());
return $this->jsonResponse('fails', $message);
}
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Controllers/Admin/helpdesk/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ public function edit($id)
//dd($form);
if ($form) {
$fields = $form->fields();

//dd($fields);
return view('themes.default1.admin.helpdesk.manage.form.edit', compact('form', 'fields', 'select_forms'));
}
Expand All @@ -215,6 +216,7 @@ public function addChildForm($id)
//dd($form);
if ($form) {
$fields = $form->fields();

//dd($fields);
return view('themes.default1.admin.helpdesk.manage.form.add-child', compact('form', 'fields', 'select_forms'));
}
Expand Down
4 changes: 4 additions & 0 deletions app/Http/Controllers/Admin/helpdesk/GroupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,11 @@ public function update($id, Groups $group, GroupUpdateRequest $request)
//Updating admin_notes field
$adminNotes = $request->input('admin_notes');
$var->admin_notes = $adminNotes;

/* Check whether function success or not */
try {
$var->save();

/* redirect to Index page with Success Message */
return redirect('groups')->with('success', Lang::get('lang.group_updated_successfully'));
} catch (Exception $e) {
Expand Down Expand Up @@ -198,9 +200,11 @@ public function destroy($id, Groups $group, Group_assign_department $group_assig
}
$group_assign_department->where('group_id', $id)->delete();
$groups = $group->whereId($id)->first();

/* Check whether function success or not */
try {
$groups->delete();

/* redirect to Index page with Success Message */
return redirect('groups')->with('success', Lang::get('lang.group_deleted_successfully'));
} catch (Exception $e) {
Expand Down
4 changes: 4 additions & 0 deletions app/Http/Controllers/Admin/helpdesk/HelptopicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public function store(Help_topic $topic, HelptopicRequest $request)
}
/* Check whether function success or not */
$topic->fill($request->except('custom_form', 'auto_assign'))->save();

// $topics->fill($request->except('custom_form','auto_assign'))->save();
/* redirect to Index page with Success Message */
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_created_successfully'));
Expand Down Expand Up @@ -192,6 +193,7 @@ public function update($id, Help_topic $topic, HelptopicUpdate $request)
->where('id', '=', 1)
->update(['help_topic' => $id]);
}

/* redirect to Index page with Success Message */
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_updated_successfully'));
} catch (Exception $e) {
Expand Down Expand Up @@ -238,9 +240,11 @@ public function destroy($id, Help_topic $topic, Ticket $ticket_setting)
}
$message = $ticket.$email;
$topics = $topic->whereId($id)->first();

/* Check whether function success or not */
try {
$topics->delete();

/* redirect to Index page with Success Message */
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_deleted_successfully').$message);
} catch (Exception $e) {
Expand Down
Loading
Loading