MediaCustomer.php 452 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Modules\OfficialAccount\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class MediaCustomer extends Model
  5. {
  6. protected $table = 'media_customer';
  7. protected $fillable = ['appid','media_id','url','customer_contact','distribution_channel_id'];
  8. /**
  9. * 根据appid获取mediaId
  10. */
  11. static function mediaCustomerByAppid($appid)
  12. {
  13. return self::where('appid',$appid)->get();
  14. }
  15. }