phpldapadmin/app/Ldap/Entry.php
2021-12-10 23:51:48 +11:00

26 lines
429 B
PHP

<?php
namespace App\Ldap;
use LdapRecord\Models\Model;
class Entry extends Model
{
/**
* The object classes of the LDAP model.
*
* @var array
*/
public static $objectClasses = [];
public function rootDSE($connection = null)
{
return static::on($connection ?? (new static)->getConnectionName())
->in(null)
->read()
->select(['+'])
->whereHas('objectclass')
->firstOrFail();
}
}