update kolompok belajar
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Program;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\User;
|
||||
|
||||
class DetailKelompok extends Model
|
||||
{
|
||||
protected $table = 'detail_kelompok';
|
||||
|
||||
protected $fillable = [
|
||||
'kelompok_id',
|
||||
'user_id',
|
||||
'nama_anggota',
|
||||
'jabatan',
|
||||
'no_hp',
|
||||
'alamat'
|
||||
];
|
||||
|
||||
// RELASI KE KELOMPOK
|
||||
public function kelompok()
|
||||
{
|
||||
return $this->belongsTo(
|
||||
KelompokBelajarTani::class,
|
||||
'kelompok_id'
|
||||
);
|
||||
}
|
||||
|
||||
// RELASI KE USER
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(
|
||||
User::class,
|
||||
'user_id'
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user