Order.php 538 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Order extends Model
  5. {
  6. public function clients()
  7. {
  8. return $this->belongsTo(Client::class, 'client_id', 'id');
  9. }
  10. public function halls()
  11. {
  12. return $this->belongsTo(Hall::class, 'hall_id', 'id');
  13. }
  14. public function workers()
  15. {
  16. return $this->belongsTo(Worker::class, 'worker_id', 'id');
  17. }
  18. public function services()
  19. {
  20. return $this->belongsTo(Service_worker::class, 'service_id', 'id');
  21. }
  22. }