User.php 396 B

1234567891011121314151617181920
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class User extends Model
  5. {
  6. public function user_pay()
  7. {
  8. return $this->hasMany(UserPay::class);
  9. }
  10. public function warea()
  11. {
  12. return $this->hasOne('App\Models\Warea','id','warea_id');
  13. }
  14. public function GetGiftImg(){
  15. return $this->hasOne(GiftUserImg::class,'user_id');
  16. }
  17. }