/** * Display a listing of the resource. * * @return Response */ public function index() { $query = EmailDelete::SELECT('emailId')->where('userId', Auth::user()->id)->get()->toArray(); $adminemail = DB::table('notification')->where('from', Auth::user()->id)->whereNotIn('id', $query)->orderBy('id', 'desc')->paginate(10); $adminemail->setPath('adminemail'); return view('member.notification_index')->with('adminemail', $adminemail); }
public function notification_email_view() { $query = EmailDelete::SELECT('emailId')->where('userId', Auth::user()->id)->get()->toArray(); if (Auth::user()->loginas == 2) { $email = DB::table('notification')->whereIn('to', ['a', 'e', Auth::user()->id])->whereNotIn('id', $query)->orderBy('id', 'desc')->paginate(10); // return view('agent.notification')->with('not',$not); } else { $email = DB::table('notification')->whereIn('to', ['a', 'g', Auth::user()->id])->whereNotIn('id', $query)->orderBy('id', 'desc')->paginate(10); } $email->setPath('email'); return view('agent.notification')->with('email', $email); }