I found my problem! I wasn't passing my $user variable , I just added
->with('user', $user)
if ($request->ajax()) {
return [
'statuses' => view('ajax.status')->with('user', $user)->with(compact('statuses'))->render(),
'next_page' => $statuses->nextPageUrl()
];
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community