src/Controllers/AgentsController.php
public function addAgents($user_ids)
    {
        $users = Agent::find($user_ids);
        foreach ($users as $user) {
            $user->ticketit_agent = true;
            $user->save();
            $users_list[] = $user->name;
        }

        return $users_list;
    }
public function addAgents($user_ids)
    {
        $users = Agent::find($user_ids);
        foreach ($users as $user) {
            $user->ticketit_agent = true;
            $user->save();
            $users_list[] = $user->name;
        }

        return $users_list;
    }
public function addAgents ( $ user_ids ) { $ users = Agent :: find ( $ user_ids ) ; foreach ( $ users as $ user ) { $ user -> ticketit_agent = true ; $ user -> save ( ) ; $ users_list [ ] = $ user -> name ; } return $ users_list ; }
Assign users as agents.

@param $user_ids

@return array
Assign users as agents .