?> @foreach ( $kecamatan as $kec ) <option value="{{ $kec->id }}" {{ $kec->id == $pembudidaya->desa->kecamatan->id ? 'selected':'' }}>{{ $kec->nama }}</option> @endforeach </select> </div> </div> </div> <div class="col-sm-6"> <label><b>Desa/Kelurahan</b></label> <div class="form-group"> <span id="desa"> <select class="full-width" name="desa" data-init-plugin="select2" required> <?php $desa = App\Desa::all(); ?> @foreach ( $desa as $des ) <option value="{{ $des->id }}" {{ $des->id == $pembudidaya->id_desa ? 'selected':'' }}>{{ $des->nama }}</option> @endforeach </select> </span> </div> </div> </div> <div class="row"> <div class="col-sm-4"> <div class="form-group"> <label>RT/RW</label> <input type="text" class="form-control" name="erte" value="{{ $pembudidaya->erte }}">
public function run() { App\Desa::truncate(); DB::table('desa')->insert(array(0 => array('id_kecamatan' => '7303010', 'nama' => 'Bonto Jai'), 1 => array('id_kecamatan' => '7303010', 'nama' => 'Bonto Manai'), 2 => array('id_kecamatan' => '7303010', 'nama' => 'Bonto Lebang'), 3 => array('id_kecamatan' => '7303010', 'nama' => 'Bonto Sunggu'), 4 => array('id_kecamatan' => '7303010', 'nama' => 'Bonto Rita'), 5 => array('id_kecamatan' => '7303010', 'nama' => 'Bonto Atu'), 6 => array('id_kecamatan' => '7303010', 'nama' => 'Bonto Salluang'), 7 => array('id_kecamatan' => '7303010', 'nama' => 'Bonto Langkasa'), 8 => array('id_kecamatan' => '7303010', 'nama' => 'Bonto Cinde'), 9 => array('id_kecamatan' => '7303010', 'nama' => 'Bonto Loe'), 10 => array('id_kecamatan' => '7303010', 'nama' => 'Bonto Jaya'), 11 => array('id_kecamatan' => '7303011', 'nama' => 'Bonto Rannu'), 12 => array('id_kecamatan' => '7303011', 'nama' => 'Bonto Tallasa'), 13 => array('id_kecamatan' => '7303011', 'nama' => 'Bonto Daeng'), 14 => array('id_kecamatan' => '7303011', 'nama' => 'Bonto Tangnga'), 15 => array('id_kecamatan' => '7303011', 'nama' => 'Bonto Marannu'), 16 => array('id_kecamatan' => '7303011', 'nama' => 'Bonto Lojong'), 17 => array('id_kecamatan' => '7303012', 'nama' => 'Bonto Matene'), 18 => array('id_kecamatan' => '7303012', 'nama' => 'Bonto Tiro'), 19 => array('id_kecamatan' => '7303012', 'nama' => 'Bonto Majannang'), 20 => array('id_kecamatan' => '7303012', 'nama' => 'Bonto Karaeng'), 21 => array('id_kecamatan' => '7303012', 'nama' => 'Bonto Maccini'), 22 => array('id_kecamatan' => '7303012', 'nama' => 'Bonto Bulaeng'), 23 => array('id_kecamatan' => '7303020', 'nama' => 'Tappanjeng'), 24 => array('id_kecamatan' => '7303020', 'nama' => 'Pallantikang'), 25 => array('id_kecamatan' => '7303020', 'nama' => 'Letta'), 26 => array('id_kecamatan' => '7303020', 'nama' => 'Mallilingi'), 27 => array('id_kecamatan' => '7303020', 'nama' => 'Lembang'), 28 => array('id_kecamatan' => '7303020', 'nama' => 'Lamalaka'), 29 => array('id_kecamatan' => '7303020', 'nama' => 'Karatuang'), 30 => array('id_kecamatan' => '7303020', 'nama' => 'Onto'), 31 => array('id_kecamatan' => '7303020', 'nama' => 'Kayu Loe'), 32 => array('id_kecamatan' => '7303021', 'nama' => 'Ulugalung'), 33 => array('id_kecamatan' => '7303021', 'nama' => 'Mamampang'), 34 => array('id_kecamatan' => '7303021', 'nama' => 'Mappilawing'), 35 => array('id_kecamatan' => '7303021', 'nama' => 'Lonrong'), 36 => array('id_kecamatan' => '7303021', 'nama' => 'Barua'), 37 => array('id_kecamatan' => '7303021', 'nama' => 'Kampala'), 38 => array('id_kecamatan' => '7303021', 'nama' => 'Pa\'bentengan'), 39 => array('id_kecamatan' => '7303021', 'nama' => 'Parangloe'), 40 => array('id_kecamatan' => '7303021', 'nama' => 'Pa\'bumbungan'), 41 => array('id_kecamatan' => '7303030', 'nama' => 'Lembang Gantarangkeke'), 42 => array('id_kecamatan' => '7303030', 'nama' => 'Pattallassang'), 43 => array('id_kecamatan' => '7303030', 'nama' => 'Bonto-bontoa'), 44 => array('id_kecamatan' => '7303030', 'nama' => 'Banyorang'), 45 => array('id_kecamatan' => '7303030', 'nama' => 'Campaga'), 46 => array('id_kecamatan' => '7303030', 'nama' => 'Bonto Tappalang'), 47 => array('id_kecamatan' => '7303030', 'nama' => 'Balumbung'), 48 => array('id_kecamatan' => '7303030', 'nama' => 'Ereng-ereng'), 49 => array('id_kecamatan' => '7303030', 'nama' => 'Labbo'), 50 => array('id_kecamatan' => '7303030', 'nama' => 'Pattaneteang'), 51 => array('id_kecamatan' => '7303031', 'nama' => 'Rappoa'), 52 => array('id_kecamatan' => '7303031', 'nama' => 'Biangloe'), 53 => array('id_kecamatan' => '7303031', 'nama' => 'Lumpangan'), 54 => array('id_kecamatan' => '7303031', 'nama' => 'Biangkeke'), 55 => array('id_kecamatan' => '7303031', 'nama' => 'Nipa-nipa'), 56 => array('id_kecamatan' => '7303031', 'nama' => 'Pa\'jukukang'), 57 => array('id_kecamatan' => '7303031', 'nama' => 'Borongloe'), 58 => array('id_kecamatan' => '7303031', 'nama' => 'Papanloe'), 59 => array('id_kecamatan' => '7303031', 'nama' => 'Baruga'), 60 => array('id_kecamatan' => '7303031', 'nama' => 'Batukaraeng'), 61 => array('id_kecamatan' => '7303032', 'nama' => 'Tanahloe'), 62 => array('id_kecamatan' => '7303032', 'nama' => 'Tombolo'), 63 => array('id_kecamatan' => '7303032', 'nama' => 'Layoa'), 64 => array('id_kecamatan' => '7303032', 'nama' => 'Bajiminasa'), 65 => array('id_kecamatan' => '7303032', 'nama' => 'Kaloling'), 66 => array('id_kecamatan' => '7303032', 'nama' => 'Gantarangkeke'))); }