플러그인에서 User Model 객체를 생성하려면 어떻게 해야 하나요?
SimpleCode
- 2019.05.24
- 조회수 209
- 댓글수 2
DB에 로그인 기록을 남겨서, 리스트에 표시하려고 합니다.
회원 프로필 이미지를 표시하기 위해 getProfileImage() 메소드를 호출하려고 합니다.
/**
* User constructor.
*
* @param array $attributes attributes
*/
public function __construct(array $attributes = [])
{
$this->setProxyOptions(['group' => 'user']);
$dynamicAttributes = app('xe.dynamicField')->getDynamicAttributes('user');
$this->makeVisible($dynamicAttributes);
parent::__construct($attributes);
}
생성자를 보니 배열로 뭔가 값을 넘겨줘야할 것 같은데... 어떻게 해야할까요?
0개 댓글