CustomScheduleSpeciality.php 619 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  6. class CustomScheduleSpeciality extends Model
  7. {
  8. use SoftDeletes;
  9. protected $table = "custom_schedules_specialities";
  10. protected $fillable = [
  11. 'custom_schedule_id',
  12. 'speciality_id',
  13. ];
  14. public function customSchedule(): BelongsTo
  15. {
  16. return $this->belongsTo(CustomSchedule::class);
  17. }
  18. public function speciality(): BelongsTo
  19. {
  20. return $this->belongsTo(Speciality::class);
  21. }
  22. }