Example #1
0
 public static function getAll()
 {
     // check to see if there is an LDAP connection for this environment
     //
     $ldapConnectionConfig = Config::get('ldap.connections.' . App::environment());
     if ($ldapConnectionConfig) {
         // use LDAP
         //
         return LDAP::getAll();
     } else {
         // use SQL / Eloquent
         //
         return User::all();
     }
 }