You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
class LanzuMmInfo extends Model{ use HasDateTimeFormatter; protected $table = 'lanzu_mm_info'; protected $dateFormat = 'U';
public function Withdraw() { return $this->hasOne('\App\Models\LanzuMmWithdraw','mm_id','id'); }
/** * 获取市场经理(只搜索状态是正常的经理) * id为键,name为值 */ public static function getMmInfoArray() { $list = self::select('id','name') ->where('is_del',0) ->where('status',1) ->get(); $array = []; if(count($list) > 0){ foreach ($list as $key => $value){ $array[$value->id] = $value->name; } } return $array; }}
|