1
0
mirror of https://github.com/robonen/education-project.git synced 2026-03-20 10:54:31 +00:00

Создание, обновление, получение, фильтрация

This commit is contained in:
nikden13
2020-12-04 11:09:57 +07:00
parent 4a8e802c03
commit 45bec16c7f
7 changed files with 266 additions and 0 deletions

31
app/Models/Timetable.php Normal file
View File

@@ -0,0 +1,31 @@
<?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',
];
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);
}
}