Performance workarounds as a result of 1bba21 - need to work on with()

This commit is contained in:
Deon George
2021-07-02 15:10:22 +10:00
parent 1bba21dcef
commit 90190bb301
5 changed files with 13 additions and 10 deletions

View File

@@ -35,8 +35,10 @@ class HomeController extends Controller
public function home(User $o): View
{
// If we are passed a user to view, we'll open up their home page.
if ($o->exists)
if ($o->exists) {
$o->load(['accounts','services']);
return View('u.home',['o'=>$o]);
}
// If User was null, then test and see what type of logged on user we have
$o = Auth::user();