GiftOrder.php 425 B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class GiftOrder extends Model{
  5. protected $table='gift_orders';
  6. public function get_user(){
  7. return $this->belongsTo(User::class,'uid');
  8. }
  9. public function get_glory(){
  10. return $this->belongsTo(Glory::class,'uid');
  11. }
  12. public function get_order(){
  13. return $this->hasMany(GiftOrder::class,'uid','uid');
  14. }
  15. }