CompanyService.php 465 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class CompanyService extends Model
  5. {
  6. protected $table = "company_service";
  7. protected $guarded=['id'];
  8. function company()
  9. {
  10. return $this->belongsTo('App\Models\CompanyModel','company_id');
  11. }
  12. function services()
  13. {
  14. return $this->belongsTo('App\Models\ServiceList','service_id');
  15. }
  16. function attachments()
  17. {
  18. return $this->hasMany('App\Models\ServiceAttachment','service_id');
  19. }
  20. }