I work on an Message System and i want Query the conversation between 2 Users. I cant use Controller now, soo i must try it on this way.
I want display the Results for example Title between my User ID Auth::user and the Senders ID.
Where "to" is my ID= Auth::user : ->where('to',
How can i change this Code, because with my Code i see all Messages from me and not only between my ID and the Other part ID:
<?php $subjects = DB::table('messages')->where('to', '=', Auth::user()->id)->pluck('title'); echo $subject; ?>
Thanks
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire