I did the code below and I tried to use 'parents' to share a file to a specific folder, but it didn't work. I looked everywhere for a solution, but I can't find any.
function grantPermission($role, $user, $atividade){
$userPermission = new Google_Service_Drive_Permission(array(
'type' => 'user',
'role' => $role,
'emailAddress' => $user->email,
'parents' => array($user->folder_id_minhas_atividades),
));
$request = $this->drive->permissions->create($atividade->folder_id, $userPermission, array('fields' => 'id'));
$ret = redirect()->route('verAtividade.verPessoas', ['atividade_id' => $atividade->id]);
return $ret;
}