user()->id)->orderBy('created_at','DESC')->paginate(12); $notifications->map(function($notification){ $notification->type_text = Config::get('tipask.notification_types.'.$notification->type); }); $this->readNotifications(0,'user'); return view('theme::notification.index')->with('notifications',$notifications); } public function getReadAll() { Notification::where('to_user_id','=',Auth()->user()->id)->where('is_read','=',0)->update(['is_read'=>1]); return $this->success(route('auth.notification.index'),'设置成功'); } }