Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubah agar seed lebih konsisten saat buat data #42

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 44 additions & 43 deletions database/seeds/DasDataDesaTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,138 +13,139 @@ class DasDataDesaTableSeeder extends Seeder
public function run()
{

$kecamatan_id = Config::get('app.default_profile');

\DB::table('das_data_desa')->delete();

\DB::table('das_data_desa')->insert(array (
0 =>
array (
'desa_id' => '53.06.13.2001',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2001',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Bedalewun',
),
1 =>
array (
'desa_id' => '53.06.13.2002',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2002',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Lebanuba',
),
2 =>
array (
'desa_id' => '53.06.13.2003',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2003',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Rianwale',
),
3 =>
array (
'desa_id' => '53.06.13.2004',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2004',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Bungalawan',
),
4 =>
array (
'desa_id' => '53.06.13.2005',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2005',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Lamawolo',
),
5 =>
array (
'desa_id' => '53.06.13.2006',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2006',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Helanlangowuyo',
),
6 =>
array (
'desa_id' => '53.06.13.2007',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2007',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Lewopao',
),
7 =>
array (
'desa_id' => '53.06.13.2008',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2008',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Nelereren',
),
8 =>
array (
'desa_id' => '53.06.13.2009',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2009',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Boleng',
),
9 =>
array (
'desa_id' => '53.06.13.2010',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2010',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Neleblolong',
),
10 =>
array (
'desa_id' => '53.06.13.2011',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2011',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Duablolong',
),
11 =>
array (
'desa_id' => '53.06.13.2012',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2012',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Lewokeleng',
),
12 =>
array (
'desa_id' => '53.06.13.2013',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2013',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Nelelamawangi',
),
13 =>
array (
'desa_id' => '53.06.13.2014',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2014',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Harubala',
),
14 =>
array (
'desa_id' => '53.06.13.2015',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2015',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Nelelamadike',
),
15 =>
array (
'desa_id' => '53.06.13.2016',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2016',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Lamabayung',
),
16 =>
array (
'desa_id' => '53.06.13.2017',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2017',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Lewat',
),
17 =>
array (
'desa_id' => '53.06.13.2018',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2018',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Dokeng',
),
18 =>
array (
'desa_id' => '53.06.13.2019',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2019',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Bayuntaa',
),
19 =>
array (
'desa_id' => '53.06.13.2020',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2020',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Nobo',
),
20 =>
array (
'desa_id' => '53.06.13.2021',
'kecamatan_id' => '53.06.13',
'desa_id' => $kecamatan_id . '.2021',
'kecamatan_id' => $kecamatan_id,
'nama' => 'Nelelamawangi Dua',
),
));


}
}
}
5 changes: 2 additions & 3 deletions database/seeds/DasDataUmumTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ class DasDataUmumTableSeeder extends Seeder
public function run()
{


\DB::table('das_data_umum')->delete();

\DB::table('das_data_umum')->insert(array (
0 =>
array (
'id' => 1,
'profil_id' => 1,
'kecamatan_id' => '53.06.13',
'kecamatan_id' => Config::get('app.default_profile'),
'tipologi' => 'Kecamatan maju namun terpencil.',
'ketinggian' => 1,
'luas_wilayah' => 0.0,
Expand Down Expand Up @@ -54,4 +53,4 @@ public function run()


}
}
}
8 changes: 5 additions & 3 deletions database/seeds/DasProfilTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ class DasProfilTableSeeder extends Seeder
*/
public function run()
{
$kecamatan_id = Config::get('app.default_profile');

\DB::table('das_profil')->delete();

\DB::table('das_profil')->insert(array (
0 =>
array (
'id' => 1,
'provinsi_id' => '53',
'kabupaten_id' => '53.06',
'kecamatan_id' => '53.06.13',
'provinsi_id' => substr($kecamatan_id, 0, 2),
'kabupaten_id' => substr($kecamatan_id, 0, 5),
'kecamatan_id' => $kecamatan_id,
'alamat' => 'Jl. Koperasi No. 1, Kab Lombok Barat, Provinsi Nusa Tenggara Barat',
'kode_pos' => '83653',
'telepon' => '021-2345234',
Expand Down