Eager load organizations on contacts index
This commit is contained in:
parent
bfcee13af9
commit
a0f9aab560
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue