mirror of
https://github.com/dyzulk/santulitam-temp.git
synced 2026-01-26 05:45:28 +07:00
first commit
This commit is contained in:
31
app/Models/Student.php
Normal file
31
app/Models/Student.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Student extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'nim',
|
||||
'image',
|
||||
'major_id',
|
||||
'email',
|
||||
'phone',
|
||||
'peleton_id'
|
||||
];
|
||||
|
||||
public function major()
|
||||
{
|
||||
return $this->belongsTo(Major::class);
|
||||
}
|
||||
|
||||
public function peleton()
|
||||
{
|
||||
return $this->belongsTo(Peleton::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user