applicant-site/app/Models/Subject.php

26 lines
499 B
PHP
Raw Permalink Normal View History

2024-02-17 11:30:32 +03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Subject extends Model
{
use HasFactory;
protected $fillable = [
'id',
'name',
'description',
'slug',
'position',
];
public function entranceExaminations(): HasMany
{
return $this->hasMany('App\Models\EntranceExamination', 'subject_id');
}
}