0
我已经安装了Cmgmyr \ Messenger,但是,由于我的用户表不包含name
字段,因此我需要扩展线程模型和潜在的其他几个模型。扩展包模型
我需要延长的方法是:
/**
* Generates a string of participant information
*
* @param null $userId
* @param array $columns
* @return string
*/
public function participantsString($userId=null, $columns=['name'])
{
$selectString = $this->createSelectString($columns);
$participantNames = $this->getConnection()->table('users')
->join('participants', 'users.id', '=', 'participants.user_id')
->where('participants.thread_id', $this->id)
->select($this->getConnection()->raw($selectString));
if ($userId !== null) {
$participantNames->where('users.id', '!=', $userId);
}
$userNames = $participantNames->lists('users.name');
return implode(', ', $userNames);
}
通知的users.name提起被称为?这就是需要改变的用户名,甚至更好的users.firstname和users.lastname在一起。
我需要把它扩大到以下结构:
Modules/
- Email/
- Models/
- Thread.php
我怎么能去呢?
@TheRabbitFactory - 这样做,回答你的问题?你需要更多信息吗? – Laurence