public function index($param = 'home') { $dataInstansi = DataInstansi::find(1); $kabKotaId = $dataInstansi->kabkota_id; $tower = Tower::whereKabkotaId($kabKotaId)->whereRaw(" gambar != '' ")->get(); $data['tower'] = $tower; return View::make($param, $data); }
public function laporan() { $data['datawartel'] = $this->wartel->tampilData(); $dataInstansi = DataInstansi::find(1); $kabKotaId = $dataInstansi->kabkota_id; $tower = Tower::whereKabkotaId($kabKotaId)->get(); $data['dataInstansi'] = DataInstansi::find(1); return View::make('admin.laporan.wartel', $data); }
$t = Tower::whereKabkotaId($kabKotaId)->whereZona($v)->whereDibangunTahun($lastYear)->get()->count(); ?> "{{$t}}", @endforeach], @endif }, { label : '{{$thisYear}}', fillColor : "rgba(151,187,205,0.5)", strokeColor : "rgba(151,187,205,0.8)", highlightFill : "rgba(151,187,205,0.75)", highlightStroke : "rgba(151,187,205,1)", @if($title=='Menara') data : [@foreach($perusahaan as $p) "{{$p->tower()->whereDibangunTahun($thisYear)->count()}}", @endforeach], @elseif($title=='Zona') data : [@foreach($zona as $k=>$v) <?php $t = Tower::whereKabkotaId($kabKotaId)->whereZona($v)->whereDibangunTahun($thisYear)->get()->count(); ?> "{{$t}}", @endforeach], @endif } ] } window.onload = function(){ var ctx = document.getElementById("canvas").getContext("2d"); window.myBar = new Chart(ctx).Bar(barChartData, { responsive : true, multiTooltipTemplate: "<%= datasetLabel %> - <%= value %>", maintainAspectRatio: false });
public function laporan() { #old //$tower = tower::with('pembayaran')->get(); # Kirim variabel ke View $dataInstansi = DataInstansi::find(1); $kabKotaId = $dataInstansi->kabkota_id; $tower = Tower::whereKabkotaId($kabKotaId)->get(); $dataInstansi = DataInstansi::find(1); return View::make('admin.laporan.tower', compact('tower', 'dataInstansi')); }