Exemplo n.º 1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $id = Auth::id();
     $unread = Inbox::where('mail_read', '=', '0')->where('member_id', '=', $id)->get();
     echo $unread->count();
     /*foreach ($inboxes as $inbox) {
                    $count=$inbox->member_id;
                    echo $count;
                    
                 }
     
     	*/
     //echo $created_at;
     //echo $msgs;
     // HelperController::getInbox('subject');
 }
Exemplo n.º 2
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function sendRead()
 {
     $members = Member::all();
     //all data of member collection
     $inbox_id = HelperController::getPage();
     $id = Auth::id();
     $author = User::find($id);
     $inbox = Inbox::find($inbox_id);
     //find data in Inbox collection
     $unread = Inbox::where('mail_read', '=', '0')->where('member_id', '=', $id)->get()->count();
     //mailbox view
     return view('vendor/flatAdmin/mailRead', compact(array('members', 'author', 'inbox', 'unread', 'id')));
 }