LogisticTiming.php 529 B

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