applicant-site/app/Models/Admission.php

24 lines
441 B
PHP
Raw Normal View History

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