mirror of
https://github.com/robonen/education-project.git
synced 2026-03-20 19:04:31 +00:00
33 lines
548 B
PHP
33 lines
548 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\Validator;
|
|
|
|
class Student extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $guarded = [
|
|
'user_id',
|
|
'updated_at',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'user_id',
|
|
];
|
|
|
|
public function schoolClass()
|
|
{
|
|
return $this->belongsTo(SchoolClass::class, 'class_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
}
|