25 lines
447 B
PHP
25 lines
447 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Student extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'last_name',
|
|
'middle_name',
|
|
'birthday',
|
|
];
|
|
|
|
public function grade(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Grade::class);
|
|
}
|
|
}
|