QappUser.php 599 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Modules\User\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class QappUser extends Model
  5. {
  6. protected $table = 'qapp_users';
  7. protected $fillable = [
  8. 'imei',
  9. 'oaid',
  10. 'androidid',
  11. 'device_no',
  12. 'mac',
  13. 'uid',
  14. 'device_info',
  15. 'phone',
  16. 'channel_id',
  17. 'status',
  18. ];
  19. /**
  20. * @param $uid
  21. * @return array
  22. */
  23. public static function getUserByUid($uid)
  24. {
  25. if (empty($uid)) {
  26. return [];
  27. }
  28. return self::where('uid', $uid)->first();
  29. }
  30. }