mirror of
https://github.com/rekywhyd/WebGIS_PengentasanKemiskinan.git
synced 2026-07-10 19:33:07 +00:00
Memperbarui UI/UX
This commit is contained in:
@@ -14,15 +14,32 @@ class TempatIbadah extends Model
|
||||
protected $fillable = [
|
||||
'nama_tempat',
|
||||
'jenis_tempat_ibadah',
|
||||
'kontak_person',
|
||||
'nama_pengurus',
|
||||
'kontak_pengurus',
|
||||
'radius_meter',
|
||||
'lat',
|
||||
'lng',
|
||||
'alamat'
|
||||
'alamat',
|
||||
'password',
|
||||
'kode_lapor',
|
||||
];
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
static::creating(function ($tempatIbadah) {
|
||||
if (empty($tempatIbadah->kode_lapor)) {
|
||||
$tempatIbadah->kode_lapor = \Illuminate\Support\Str::random(10);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function penerima_bantuan()
|
||||
{
|
||||
return $this->hasMany(PenerimaBantuan::class, 'id_tempat_ibadah');
|
||||
}
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->hasMany(User::class, 'id_tempat_ibadah');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user