Worker.php 407 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Worker extends Model
  5. {
  6. public function work_positions()
  7. {
  8. return $this->belongsTo(Work_position::class, 'id_position', 'id');
  9. }
  10. public function orders()
  11. {
  12. return $this->hasMany(Order::class);
  13. }
  14. public function servoces()
  15. {
  16. return $this->hasMany(Service_worker::class);
  17. }
  18. }