profil petani dashboard
This commit is contained in:
@@ -17,7 +17,7 @@ class ProfilPetaniController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
if (!Gate::allows('super_admin') && !Gate::allows('admin')) {
|
||||
if (!Gate::any(['super_admin', 'admin', 'fasilitator'])) {
|
||||
abort(403);
|
||||
}
|
||||
$title = 'Dashboard Profil Petani';
|
||||
@@ -35,8 +35,8 @@ class ProfilPetaniController extends Controller
|
||||
->get();
|
||||
$lahanSummary = Lahan::select(
|
||||
'komoditas_id',
|
||||
DB::raw('COUNT(*) as total',
|
||||
DB::raw('SUM(luas_lahan) as luas_lahan'))
|
||||
DB::raw('COUNT(*) as total'),
|
||||
DB::raw('SUM(luas_lahan) as luas_lahan')
|
||||
)
|
||||
->whereIn('petani_id', $petani)
|
||||
->groupBy('komoditas_id')
|
||||
|
||||
Reference in New Issue
Block a user