validation-bugsnag-email
This commit is contained in:
@@ -93,7 +93,7 @@ class AgentController extends Controller
|
||||
// returns to the page with all the variables and their datas
|
||||
$send_otp = DB::table('common_settings')->select('status')->where('option_name', '=', 'send_otp')->first();
|
||||
|
||||
return view('themes.default1.admin.helpdesk.agent.agents.create', compact('assign', 'teams', 'agents', 'timezones', 'groups', 'departments', 'team', 'send_otp'))->with('phonecode', $phonecode->phonecode);
|
||||
return view('themes.default1.admin.helpdesk.agent.agents.create', compact('teams', 'timezones', 'groups', 'departments', 'team', 'send_otp'))->with('phonecode', $phonecode->phonecode);
|
||||
} catch (Exception $e) {
|
||||
// returns if try fails with exception meaagse
|
||||
return redirect()->back()->with('fails', $e->getMessage());
|
||||
@@ -111,6 +111,9 @@ class AgentController extends Controller
|
||||
*/
|
||||
public function store(User $user, AgentRequest $request)
|
||||
{
|
||||
if ($request->fails()) {
|
||||
return redirect('agents/create');
|
||||
}
|
||||
if ($request->get('country_code') == '' && ($request->get('phone_number') != '' || $request->get('mobile') != '')) {
|
||||
return redirect()->back()->with(['fails2' => Lang::get('lang.country-code-required-error'), 'country_code' => 1])->withInput();
|
||||
} else {
|
||||
@@ -195,7 +198,7 @@ class AgentController extends Controller
|
||||
$teams = $team->pluck('id', 'name')->toArray();
|
||||
$assign = $team_assign_agent->where('agent_id', $id)->pluck('team_id')->toArray();
|
||||
|
||||
return view('themes.default1.admin.helpdesk.agent.agents.edit', compact('teams', 'assign', 'table', 'teams1', 'selectedTeams', 'user', 'timezones', 'groups', 'departments', 'team', 'exp', 'counted'))->with('phonecode', $phonecode->phonecode);
|
||||
return view('themes.default1.admin.helpdesk.agent.agents.edit', compact('teams', 'assign', 'table', 'teams1', 'user', 'timezones', 'groups', 'departments', 'team', 'exp', 'counted'))->with('phonecode', $phonecode->phonecode);
|
||||
} catch (Exception $e) {
|
||||
return redirect('agents')->with('fail', Lang::get('lang.failed_to_edit_agent'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user