ADLDAP2 for Laravel 5.2 - Binding user to model

This is my first time using ADLDAP & I've only done some Laravel work, so I'm getting confused.

The notes in the config file say this:

    /*
|--------------------------------------------------------------------------
| Bind User to Model
|--------------------------------------------------------------------------
|
| The bind user to model option allows you to access the Adldap user model
| instance on your laravel database model to be able run operations
| or retrieve extra attributes on the Adldap user model instance.
|
| If this option is true, you must insert the trait:
|
|   `Adldap\Laravel\Traits\AdldapUserModelTrait`
|
| Onto your User model configured in `config/auth.php`.
|
| Then use `Auth::user()->adldapUser` to access.
|
| This option must be true or false.
|
*/

My question is where/how do I add the Adldap\Laravel\Traits\AdldapUserModelTrait trait in the config/auth.php file?

Answers


You don't use it inside your auth configuration file. But you import it in your user model. So

use Adldap\Laravel\Traits\AdldapUserModelTrait;

class User extends Authenticatable {
    use AdldapUserModelTrait;
}

Need Your Help

Getting retrieving exact input to bash from command line

bash shell unix io

How do I get bash to read input from the command line literally? I want the exact input to be preserved, so if there are quotes I want to keep them. I can accomplish what I want to do by using egre...

Windows Phone 7: Check if WiFi access point requires authentication

wcf windows-phone-7 networking wcf-data-services

This is probably a related question, except it's in Android: How to check WiFi is pass through web page login?