Browse Source

change position eloquent in list method

pull/3/head
wahyuun 1 year ago
parent
commit
18c5102722
  1. 2
      app/Http/Controllers/DivisiController.php

2
app/Http/Controllers/DivisiController.php

@ -91,7 +91,7 @@ class DivisiController extends Controller
public function list()
{
$parentMenus = Divisi::whereNull('parent')->with('children')->get();
$parentMenus = Divisi::with('children')->whereNull('parent')->get();
$divisions = [];
foreach($parentMenus as $menu){
$childs = $this->getAllChildren($menu);

Loading…
Cancel
Save