Commit b669f9f6 authored by jiangbowen's avatar jiangbowen

test conn

parent 452fb87e
<?php <?php
use Adldap\Laravel\Facades\Adldap;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Web Routes | Web Routes
...@@ -14,3 +15,22 @@ ...@@ -14,3 +15,22 @@
Route::get('/', function () { Route::get('/', function () {
return view('welcome'); return view('welcome');
}); });
Route::get('/ad', function () {
$ad = new \Adldap\Adldap();
$config = [
'hosts' => ["172.20.100.201"],
'base_dn'=>'ou=Users_hoto,dc=hoto,dc=test',
'username'=>'hcmadmin',
'password'=>'hcmadmin123'
];
$ad->addProvider($config);
try{
$provides = $ad->connect();
var_export($provides);
}catch (Exception $e) {
}
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment