Update Master Data

This commit is contained in:
2026-02-20 00:06:06 +07:00
parent 21ad516dce
commit 66c8bb6810
99 changed files with 67783 additions and 306 deletions
+1 -18
View File
@@ -10,35 +10,18 @@ use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory, Notifiable, HasApiTokens;
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'name',
'email',
'password',
'email_verified_at',
];
/**
* The attributes that should be hidden for serialization.
*
* @var list<string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace App\Models\wilayah;
use Illuminate\Database\Eloquent\Model;
class DesaKelurahan extends Model
{
protected $table = 'master_desa_kelurahan';
protected $fillable = [
'kode_desa_kelurahan',
'nama_desa_kelurahan',
'path',
'kecamatan_id',
];
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Models\Wilayah;
use Illuminate\Database\Eloquent\Model;
class KabupatenKota extends Model
{
protected $table = 'master_kabupaten_kota';
protected $fillable = [
'kode_kabupaten_kota',
'nama_kabupaten_kota',
'path',
'provinsi_id',
];
public function provinsi()
{
return $this->belongsTo(Provinsi::class, 'provinsi_id');
}
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Models\Wilayah;
use Illuminate\Database\Eloquent\Model;
class Kecamatan extends Model
{
protected $table = 'master_kecamatan';
protected $fillable = [
'kode_kecamatan',
'nama_kecamatan',
'path',
'kabupaten_kota_id',
];
public function kabupatenKota()
{
return $this->belongsTo(KabupatenKota::class, 'kabupaten_kota_id');
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace App\Models\Wilayah;
use Illuminate\Database\Eloquent\Model;
class Provinsi extends Model
{
protected $table = 'master_provinsi';
protected $fillable = [
'kode_provinsi',
'nama_provinsi',
'path',
'iso',
];
}