Eager load organizations on contacts index

This commit is contained in:
Jonathan Reinink 2019-04-02 15:08:52 -04:00
parent bfcee13af9
commit a0f9aab560
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class ContactsController extends Controller
return Inertia::render('Contacts/Index', [
'filters' => Request::all('search', 'trashed'),
'contacts' => Auth::user()->account->contacts()
->with('organization')
->orderByName()
->filter(Request::only('search', 'trashed'))
->paginate()