12345678910111213141516171819202122 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class GiftOrder extends Model{
- protected $table='gift_orders';
- public function get_user(){
- return $this->belongsTo(User::class,'uid');
- }
- public function get_glory(){
- return $this->belongsTo(Glory::class,'uid');
- }
- public function get_order(){
- return $this->hasMany(GiftOrder::class,'uid','uid');
- }
- }
|