applicant-site/app/Models/EducationalInstitution.php

25 lines
491 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class EducationalInstitution extends Model
{
use HasFactory;
protected $fillable = [
'id',
'name',
'description',
'position',
];
public function faculties(): HasMany
{
return $this->hasMany('App\Models\Faculty', 'educational_institution_id');
}
}