Package.php 614 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Package extends Model
  5. {
  6. protected $fillable=[
  7. 'logistic_number','type','weight','length','width','height','owner_id','paper_box_id',
  8. 'measuring_machine_id','recipient','status'
  9. ];
  10. public function owner(){
  11. return $this->belongsTo('App\Owner','owner_id','id');
  12. }
  13. public function paperBox(){
  14. return $this->belongsTo('App\paperBox','paper_box_id','id');
  15. }
  16. public function measuringMachine(){
  17. return $this->belongsTo('App\measuringMachine','measuring_machine_id','id');
  18. }
  19. }