LiveRomeGift.php 495 B

12345678910111213141516171819
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class LiveRomeGift extends Model
  5. {
  6. protected $table = 'love_live_rome_gift';
  7. protected $fillable = [
  8. 'uid', 'lid','gid', 'rose','fuid','level'
  9. ];
  10. public function fuser(){
  11. return $this->hasOne(Users::class,'id','fuid')->select('id','name', 'lid', 'avatar','sex','age','vip','trump','opt','city');
  12. }
  13. public function gift(){
  14. return $this->hasOne(Gifts::class,'id','gid');
  15. }
  16. }