mirror of
https://github.com/robonen/education-project.git
synced 2026-03-20 19:04:31 +00:00
37 lines
611 B
PHP
37 lines
611 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Timetable extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $guarded = [
|
|
'updated_at',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'created_at',
|
|
'updated_at',
|
|
];
|
|
|
|
public function teacher()
|
|
{
|
|
return $this->belongsTo(Teacher::class);
|
|
}
|
|
|
|
public function schoolClass()
|
|
{
|
|
return $this->belongsTo(SchoolClass::class,'class_id');
|
|
}
|
|
|
|
public function subject()
|
|
{
|
|
return $this->belongsTo(Subject::class);
|
|
}
|
|
|
|
}
|