Update users

This commit is contained in:
Luiz Filipe 2022-08-25 17:38:59 -03:00
parent 819f5becf7
commit b18810ba60

View File

@ -13,6 +13,7 @@ use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Storage;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
class UserController extends Controller
{
@ -152,15 +153,14 @@ class UserController extends Controller
//echo 'VAZIO'.PHP_EOL;
}else{
$pwd = randomPassword();
/*$user = User::create([
$user = User::create([
'client_id' => $arrayCodCliente[$i],
'name' => $userOld->name,
'client' =>
'email' => $arrayEmail[$i],
'password' => bcrypt('password'),
'remember_token' => null,
]);*/
//$user->roles()->sync(2);
'password' => Hash::make($pwd),
'profile_picture' => $userOld->profile_picture
]);
$user->roles()->sync(2);
echo $arrayCodCliente[$i].';'.$arrayEmail[$i].';'.$pwd.'<br>'.PHP_EOL;
}
}