Goodtest.php 353 B

123456789101112131415161718
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Goodtest extends Model{
  5. protected $table='goods_test';
  6. // public function goods_spec(){
  7. // return $this->hasMany(GoodSpec::class,'goods_id');
  8. // }
  9. public function get_order(){
  10. return $this->belongsTo(OrderDetail::class,'goods_id','id');
  11. }
  12. }