Eager load organizations on contacts index
This commit is contained in:
parent
bfcee13af9
commit
a0f9aab560
1 changed files with 1 additions and 0 deletions
|
@ -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()
|
||||||
|
|
Loading…
Add table
Reference in a new issue