applicant-site/app/Models/EducationalInstitution.php

26 lines
507 B
PHP
Raw Normal View History

2024-02-07 10:18:46 +03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
2024-02-07 16:34:04 +03:00
use Illuminate\Database\Eloquent\Relations\HasMany;
2024-02-07 10:18:46 +03:00
class EducationalInstitution extends Model
{
use HasFactory;
2024-02-07 16:34:04 +03:00
protected $fillable = [
'id',
'name',
2024-02-09 14:30:42 +03:00
'slug',
2024-02-07 16:34:04 +03:00
'description',
'position',
];
public function faculties(): HasMany
{
return $this->hasMany('App\Models\Faculty', 'educational_institution_id');
}
2024-02-07 10:18:46 +03:00
}