QappPackage.php 619 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Modules\User\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class QappPackage extends Model
  5. {
  6. protected $table = 'qapp_package_info';
  7. protected $fillable =
  8. [
  9. 'name',
  10. 'package',
  11. 'channel_id',
  12. 'company',
  13. 'app_pay_merchat_id',
  14. 'h5_pay_merchat_id',
  15. 'ali_pay_merchat_id',
  16. ];
  17. static function getPackage($channel_id)
  18. {
  19. return self::where('channel_id', $channel_id)->first();
  20. }
  21. public static function getPackageByPackage($package)
  22. {
  23. return self::where('package', $package)->first();
  24. }
  25. }