mirror of
https://github.com/robonen/education-project.git
synced 2026-03-20 02:44:31 +00:00
Создание, обновление, получение, фильтрация
This commit is contained in:
31
app/Models/Timetable.php
Normal file
31
app/Models/Timetable.php
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user