//viewing tickets generated by them $user= Auth::user()->_id; $tickets = ticket::where(function ($query) use ($user) { $query->where('user', '=', $user); })->get();
// created ticket by which user
$atickets = ticket::where(function ($query) use ($user) {
$query->where('user_assigned', '=', $user);
})->get();
return view('ticketviews', compact('tickets','atickets'));
$atickets returns record details such as user_id and ticket details, now i need to display the username for that particular record stored in another collection mongodb. Can anyone suggest me the code to do that.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire