applicant-site/app/Models/Admission.php

24 lines
441 B
PHP

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