CustomPushConfigs.php 579 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Modules\OfficialAccount\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class CustomPushConfigs extends Model
  5. {
  6. protected $table = 'custom_push_configs';
  7. // protected $fillable = ['title','url','image','config_id','product_id'];
  8. /**
  9. * 获取配置信息
  10. */
  11. static function customPushConfigs($type='pay_daily_push')
  12. {
  13. // return self::select()->first();
  14. $customPushConfigs = self::select()->where(['type'=>$type])->orderBy('id','desc')->limit(1)->get()->toArray();
  15. return $customPushConfigs[0];
  16. }
  17. }