PayMerchant.php 646 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Models\Pay;
  3. use Illuminate\Database\Eloquent\Model;
  4. class PayMerchant extends Model
  5. {
  6. protected $table = 'pay_merchants';
  7. protected $fillable = ['name', 'description', 'is_enabled', 'appid', 'official_account','source'];
  8. /**
  9. * 根据ID查找
  10. * @param $id
  11. * @return mixed
  12. */
  13. public static function getPayMerchantSingle($id) {
  14. return self::find($id);
  15. }
  16. /**
  17. * 查找所有的支付渠道通道
  18. * @return mixed
  19. */
  20. public static function getPayMerchantSourceList() {
  21. $result = self::select('source')->distinct();
  22. return $result;
  23. }
  24. }