QappPackage.php 640 B

123456789101112131415161718192021222324252627282930313233
  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. 'home_page',
  17. ];
  18. static function getPackage($channel_id)
  19. {
  20. return self::where('channel_id', $channel_id)->first();
  21. }
  22. public static function getPackageByPackage($package)
  23. {
  24. return self::where('package', $package)->first();
  25. }
  26. }