No Description

Schedule.php 525B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Schedule extends Model
  5. {
  6. protected $table = 'section_schedule';
  7. public $incrementing = false;
  8. public $timestamps = false;
  9. public function section() {
  10. return $this->belongsTo(Section::class);
  11. }
  12. public function getLocationAttribute() {
  13. return $this->building . ' ' . $this->room;
  14. }
  15. public function getHoursAttribute() {
  16. return $this->days . ' ' . $this->time_start . '-' . $this->time_end;
  17. }
  18. }