message = $request->message; $notificationSetting->admin_msg = $request->admin_msg; $notificationtype=""; foreach($request->type as $type){ $notificationtype .= $type.","; } $notificationSetting->type = $notificationtype; $notificationSetting->save(); } public function userNotifications($user_id) { return CustomerNotification::with('order')->where('customer_id',$user_id)->paginate(10); } }