applicant-site/app/Models/SubjectType.php

26 lines
508 B
PHP
Raw Permalink Normal View History

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