Correção ao criar usuários importado do excel
This commit is contained in:
parent
45befa9bb8
commit
206140111d
@ -72,13 +72,19 @@ class UsersWithSmartUsersImport implements ToCollection
|
|||||||
? $this->files_paths[$client_id]
|
? $this->files_paths[$client_id]
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
User::create(\compact(
|
|
||||||
|
/**
|
||||||
|
* @var ?\App\Models\User $user
|
||||||
|
*/
|
||||||
|
$user = User::create(\compact(
|
||||||
'client_id',
|
'client_id',
|
||||||
'name',
|
'name',
|
||||||
'email',
|
'email',
|
||||||
'password',
|
'password',
|
||||||
'profile_picture'
|
'profile_picture'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$user?->roles()?->sync([2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createSmartUserAccess(Collection $row, DadosCadastrais $client, string $email): void
|
private function createSmartUserAccess(Collection $row, DadosCadastrais $client, string $email): void
|
||||||
@ -90,13 +96,18 @@ class UsersWithSmartUsersImport implements ToCollection
|
|||||||
? $this->files_paths[$client_id]
|
? $this->files_paths[$client_id]
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
User::create(\compact(
|
/**
|
||||||
|
* @var ?\App\Models\User $user
|
||||||
|
*/
|
||||||
|
$user = User::create(\compact(
|
||||||
'client_id',
|
'client_id',
|
||||||
'name',
|
'name',
|
||||||
'email',
|
'email',
|
||||||
'password',
|
'password',
|
||||||
'profile_picture'
|
'profile_picture'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$user?->roles()?->sync([2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function uploadProfilePictures()
|
private function uploadProfilePictures()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user