| 1234567891011121314151617181920212223242526272829303132333435363738 | <?php/** * Created by PhpStorm. * User: tandunzhao * Date: 2017/12/7 * Time: 上午10:06 */namespace App\Modules\Trade\Models;use Illuminate\Database\Eloquent\Model;class PayMerchant extends Model{    protected $table = 'pay_merchants';    protected $fillable = ['name', 'description', 'is_enabled', 'appid', 'official_account','source'];    /**     * 根据ID查找     * @param $id     * @return mixed     */    public static function getPayMerchantSingle($id) {        return self::find($id);    }    /**     * 查找所有的支付渠道通道     * @return mixed     */    public static function getPayMerchantSourceList() {        $result = self::select('source')->distinct();        return $result;    }}
 |