eloquent-ldap icon indicating copy to clipboard operation
eloquent-ldap copied to clipboard

Class 'Settings' not found

Open isaqueprofeta opened this issue 6 years ago • 2 comments

I run into this error while trying to use this package:

ErrorException (E_ERROR) Class 'Settings' not found

Isn't eloquent-ldap suposed to be standalone (without LESK I mean)? Looking at the code, I see that maybe you can change the calls for "Settings::get" to "config" Laravel helper.

Maybe change that Validator on line 15 for Illuminate\Support\Facades\Validator also.

isaqueprofeta avatar Mar 13 '18 12:03 isaqueprofeta

Hello @isaqueprofeta,

You are right the eloquent-ldap package should be standalone, but I would like it to pick up the options from the Settings package as well if it is defined. Could do both with something like this:

        if (class_exists('App\Managers\SettingManager')) {
            $this->group_model = Setting::get('eloquent-ldap.group_model');
        } else {
            $this->group_model = config('eloquent-ldap.group_model');
        }

I do not have time to fix it at the moment, but if you are willing to send me a PR I would really appreciate it.

Regarding the Validator suggestion, why would you change it from the short declaration to the long one? Is there any advantage?

Thanks. /S

sroutier avatar Mar 14 '18 15:03 sroutier

Sorry about the delay on replying. Just changed projects and got really busy this days too. I'll set this one on my todo's list because I'm without tools to test it at the moment.

Any news I'll update this issue.

isaqueprofeta avatar Apr 08 '18 11:04 isaqueprofeta