@extends('layouts.app') @section('content')
DataTables has most features enabled by
                        default, so all you need to do to use it with your own tables is to call
                        the construction function: $().DataTable();.
                    
| No | Unit Kerja | Luas Wilayah (km2) | Jumlah | Jumlah penduduk | Jumlah rumah tangga | rata rata jiwa/rumah tangga | Kepadatan Penduduk per km2 | ||
|---|---|---|---|---|---|---|---|---|---|
| Desa | Kelurahan | Desa + Kelurahan | |||||||
| {{$key + 1}} | {{$item->nama}} | {{$item->Desa()->count()}} | {{$item->Desa()->count() + $item->kelurahan}} | {{$item->jumlah_rumah_tangga > 0 ? number_format(($item->jumlah_penduduk/($item->jumlah_rumah_tangga))*100, '2'):0}}% | {{$item->luas_wilayah > 0 ? number_format(($item->jumlah_penduduk/($item->luas_wilayah))*100, '2'):0}}% | ||||
| {{$total_luas_wilayah}} | {{$total_desa}} | {{$total_kelurahan}} | {{$total_kelurahan + $total_desa}} | {{$total_jumlah_penduduk}} | {{$total_jumlah_rumah_tangga}} | {{$total_jumlah_rumah_tangga > 0?number_format(($total_jumlah_penduduk/$total_jumlah_rumah_tangga) * 100, '2'):0}}% | {{$total_luas_wilayah > 0?number_format(($total_jumlah_penduduk/$total_luas_wilayah) * 100, '2'):0}}% | ||