applicant-site/app/Models/Department.php

25 lines
447 B
PHP
Raw Normal View History

2024-02-08 15:59:44 +03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Department extends Model
{
use HasFactory;
protected $fillable = [
'id',
'name',
'description',
'position',
];
public function faculty(): BelongsTo
{
return $this->belongsTo(Faculty::class);
}
}