xxxxxxxxxx
// Import Hash Facade
use Illuminate\Support\Facades\Hash;
// Validate the new password length...
$request->user()->fill([
'password' => Hash::make($request->newPassword)
])->save();
xxxxxxxxxx
DB::table('users')->insert([
'password' => Hash::make($data['password']),
])