使用fdesk库
This commit is contained in:
@@ -17,7 +17,7 @@ class Customer extends Model
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'customer';
|
||||
protected $table = 'crm_customer';
|
||||
|
||||
/**
|
||||
* The primary key associated with the table.
|
||||
@@ -67,7 +67,8 @@ class Customer extends Model
|
||||
*/
|
||||
public static function getCustomer($customer, $request, $tag = false)
|
||||
{
|
||||
$language = $request->user['language'] ?: 'en';
|
||||
//$language = $request->user['language'] ?: 'en';
|
||||
$language = 'zh_CN';
|
||||
$customer['grade_txt'] = Util::language($language, Constants::GRADE_EN[$customer['grade']], Constants::GRADE[$customer['grade']], Constants::GRADE_RU[$customer['grade']]);
|
||||
$customer['magnitude_txt'] = Util::language($language, Constants::MAGNITUDE_EN[$customer['magnitude']], Constants::MAGNITUDE[$customer['magnitude']], Constants::MAGNITUDE_RU[$customer['magnitude']]);
|
||||
$customer['sex_txt'] = Util::language($language, Constants::SEX_EN[$customer['sex']], Constants::SEX[$customer['sex']], Constants::SEX_RU[$customer['sex']]);
|
||||
@@ -118,7 +119,7 @@ class Customer extends Model
|
||||
*/
|
||||
public function tags()
|
||||
{
|
||||
return $this->belongsToMany(Tag::class, 'customer_tag', 'customer_id', 'tag_id')
|
||||
return $this->belongsToMany(Tag::class, 'crm_customer_tag', 'customer_id', 'tag_id')
|
||||
->withTimestamps(); // 如果需要记录关联时间
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user