123456789101112131415161718192021222324 |
- <?php
-
- namespace App;
-
- use Illuminate\Database\Eloquent\Model;
-
- class Schedule extends Model
- {
- protected $table = 'section_schedule';
-
- public $incrementing = false;
- public $timestamps = false;
-
- public function section() {
- return $this->belongsTo(Section::class);
- }
-
- public function getLocationAttribute() {
- return $this->building . ' ' . $this->room;
- }
- public function getHoursAttribute() {
- return $this->days . ' ' . $this->time_start . '-' . $this->time_end;
- }
- }
|