Roman_applicant-site/app/Models/Period.php

33 lines
642 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Period extends Model
{
use HasFactory;
protected $fillable = [
'id',
'position',
'description',
'period',
'education_form_id',
'place_type_id',
'direction_id',
];
public function direction(): BelongsTo
{
return $this->belongsTo(Direction::class);
}
public function educationForm(): BelongsTo
{
return $this->belongsTo(EducationForm::class);
}
}