コード例 #1
0
 /**
  * Display a listing of the resource.
  * @param type Groups $group
  * @param type Department $department
  * @param type Group_assign_department $group_assign_department
  * @return type Response
  */
 public function index(Groups $group, Department $department, Group_assign_department $group_assign_department)
 {
     try {
         $groups = $group->get();
         $departments = $department->lists('id');
         return view('themes.default1.admin.helpdesk.agent.groups.index', compact('departments', 'group_assign_department', 'groups'));
     } catch (Exception $e) {
         return view('404');
     }
 }
コード例 #2
0
 /**
  * Show the form for editing the specified resource.
  * @param type int $id
  * @param type User $user
  * @param type Assign_team_agent $team_assign_agent
  * @param type Timezones $timezone
  * @param type Groups $group
  * @param type Department $department
  * @param type Teams $team
  * @return type Response
  */
 public function edit($id, User $user, Assign_team_agent $team_assign_agent, Timezones $timezone, Groups $group, Department $department, Teams $team)
 {
     try {
         $user = $user->whereId($id)->first();
         $team = $team->get();
         $teams1 = $team->lists('name', 'id');
         $timezones = $timezone->get();
         $groups = $group->get();
         $departments = $department->get();
         $table = $team_assign_agent->where('agent_id', $id)->first();
         $teams = $team->lists('id', 'name');
         $assign = $team_assign_agent->where('agent_id', $id)->lists('team_id');
         return view('themes.default1.admin.helpdesk.agent.agents.edit', compact('teams', 'assign', 'table', 'teams1', 'selectedTeams', 'user', 'timezones', 'groups', 'departments', 'team', 'exp', 'counted'));
     } catch (Exception $e) {
         return redirect('agents')->with('fail', 'No such file');
     }
 }