32 lines
609 B
PHP
32 lines
609 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Wali extends Model
|
|
{
|
|
use HasFactory;
|
|
public $timestamps = false;
|
|
protected $table = 'tbl_wali';
|
|
public $incrementing = false;
|
|
protected $keyType = 'string';
|
|
|
|
protected $fillable = [
|
|
'id',
|
|
'user_id',
|
|
'siswa_id',
|
|
];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id', 'id');
|
|
}
|
|
|
|
public function siswa()
|
|
{
|
|
return $this->belongsTo(Siswa::class, 'siswa_id', 'id');
|
|
}
|
|
}
|