public function users()
    {
        $list  = [];
        $users = User::all();

        foreach ($users as $key => $user) {
            $list[$user->id] = $user->name;
        }

        return $list;
    }
public function users()
    {
        $list  = [];
        $users = User::all();

        foreach ($users as $key => $user) {
            $list[$user->id] = $user->name;
        }

        return $list;
    }
public function users ( ) { $ list = [ ] ; $ users = User :: all ( ) ; foreach ( $ users as $ key => $ user ) { $ list [ $ user -> id ] = $ user -> name ; } return $ list ; }
Make Users list.
@return array
Make Users list .