Commit a0f9aab5 by Jonathan Reinink

Eager load organizations on contacts index

1 parent bfcee13a
Showing with 1 additions and 0 deletions
...@@ -15,6 +15,7 @@ class ContactsController extends Controller ...@@ -15,6 +15,7 @@ class ContactsController extends Controller
return Inertia::render('Contacts/Index', [ return Inertia::render('Contacts/Index', [
'filters' => Request::all('search', 'trashed'), 'filters' => Request::all('search', 'trashed'),
'contacts' => Auth::user()->account->contacts() 'contacts' => Auth::user()->account->contacts()
->with('organization')
->orderByName() ->orderByName()
->filter(Request::only('search', 'trashed')) ->filter(Request::only('search', 'trashed'))
->paginate() ->paginate()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!