public function getActivityLogs() { $logs = Notification::with('sent_to_user', 'sent_by_user')->orderBy('created_at', 'desc')->paginate(15); return response()->json($logs, 200); }
public function clear(Request $request) { $notifications = Notification::with('id')->delete(); return redirect()->back(); }