首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Laravel5.2的ADLDAP2 -将用户绑定到模型

Laravel5.2的ADLDAP2 -将用户绑定到模型
EN

Stack Overflow用户
提问于 2016-09-21 15:39:29
回答 1查看 791关注 0票数 3

这是我第一次使用ADLDAP &我只做了一些Laravel的工作,所以我感到很困惑。

配置文件中的注释如下:

代码语言:javascript
复制
    /*
|--------------------------------------------------------------------------
| 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.
|
*/

我的问题是如何在config/auth.php文件中添加Adldap\Laravel\Traits\AdldapUserModelTrait特性?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-09-21 15:43:59

您不会在您的auth配置文件中使用它。但是您将它导入到用户模型中。所以

代码语言:javascript
复制
use Adldap\Laravel\Traits\AdldapUserModelTrait;

class User extends Authenticatable {
    use AdldapUserModelTrait;
}
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39621002

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档