PayMerchant.php 748 B

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