<option value="{{ $mp->id }}" {{ $pembudidaya->produksi->nama == $mp->nama ? "selected":"" }}>{{ $mp->nama }}</option> @endforeach </select> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label>Kepemilikan Sarana dan Prasarana</label> <div id="sarana"> <select name="id_sarana[]" class="full-width" data-init-plugin="select2" multiple=""> <?php $sarana = App\Sarana::where('jenis', $pembudidaya->jenisusaha->nama)->get(); ?> <?php $Ksarana = App\KepemilikanSarana::where('id_user', $pembudidaya->id)->get(); ?> <?php $Ksarana_arr = []; ?> @foreach ( $Ksarana as $val ) <?php $Ksarana_arr[] = $val->id_sarana; ?> @endforeach @foreach( $sarana as $sa ) <option value="{{ $sa->id }}" {{ in_array($sa->id, $Ksarana_arr) ? "selected":""}}>{{ $sa->sub }}</option> @endforeach </select> </div>
<thead> <tr> <th> <button class="btn btn-check" data-toggle="modal" data-target="#modal-hapus" disabled id="hapus"><i class="pg-trash"></i></button> </th> <th>Jenis</th> <th>Sarana</th> <th>Aksi</th> </tr> </thead> <tbody> @foreach($saranapengolah as $sp) <tr> <td> <?php $data_master = App\KepemilikanSarana::where('id_sarana', $sp->id)->count(); ?> <?php $title = ""; $disabled = ""; if ($data_master >= 1) { $title = "Sarana nelayan sedang terpakai"; $disabled = "disabled"; } ?> <div class="checkbox" title="<?php echo $title; ?> "> <input type="checkbox" class="pilih" value="{{ $sp->id }}" id="checkbox{{ $sp->id }}" <?php
<th>Jabatan Kelompok</th> <th>Bantuan yang telah diterima</th> </tr> </thead> <tbody> @foreach( $pembudidaya as $r ) <tr> <td>{{ $r->nik }}</td> <td>{{ $r->name }}</td> <td>{{ $r->alamat }}</td> <td>{{ $r->jenis_usaha }}</td> <td> <ul class="list-unstyled"> <?php $Ksarana = App\KepemilikanSarana::where('id_user', $r->id)->get(); ?> @foreach ( $Ksarana as $ks ) <li>{{ $ks->sarana->sub }} </li> @endforeach </ul> </td> <td>{{ $r->nama_kelompok }}</td> <td>{{ $r->nama_jabatan }}</td> <td> <ul class="list-unstyled"> <li><b>2014:</b> Kapal/Perahu</li> <li><b>2015:</b> Alat Tangkap</li> </ul> </td> </tr>