LogisticTiming.php 590 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\LogModelChanging;
  5. class LogisticTiming extends Model
  6. {
  7. use LogModelChanging;
  8. //
  9. protected $fillable = [
  10. 'logistic_id','to_province_id','to_city_id','days_at_working'
  11. ];
  12. public function logistic()
  13. {
  14. return $this->belongsTo(Logistic::class);
  15. }
  16. public function province()
  17. {
  18. return $this->belongsTo(Province::class,'to_province_id','id');
  19. }
  20. public function city()
  21. {
  22. return $this->belongsTo(City::class,'to_city_id','id');
  23. }
  24. }