Eager load group on the dashboard/components page not to query twice
This commit is contained in:
@@ -73,7 +73,7 @@ class ComponentController extends Controller
|
||||
*/
|
||||
public function showComponents()
|
||||
{
|
||||
$components = Component::orderBy('order')->orderBy('created_at')->get();
|
||||
$components = Component::with('group')->orderBy('order')->orderBy('created_at')->get();
|
||||
|
||||
$this->subMenu['components']['active'] = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user