Skip to main content

Posts

Showing posts from July, 2023

How to integrate one signal push notification in website (Laravel)?

Integrate one signal push notification     < script src = "https://cdn.onesignal.com/sdks/OneSignalSDK.js" async = "" ></ script >     < script >     var OneSignal = window . OneSignal || [];         var initConfig = {             appId: "{{ env('OneSignalApp_ID') }}" ,             notifyButton: {                 enable: true             },         };         OneSignal . push ( function () {             OneSignal . init ( initConfig );             console . log ( OneSignal );         });         OneSignal . push ( function () { /*             OneSignal.isPushNotificationsEnabled(function(isEnabled) {     ...

How to integrate pubnub chat in website?

Integrate pubnub chat   <script src="https://code.jquery.com/jquery-3.7.0.min.js" integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g=" crossorigin="anonymous"></script> <script src="https://cdn.pubnub.com/sdk/javascript/pubnub.7.2.3.min.js"></script> <style> .user_pubnub_mgs {     height: 450px;     border: 1px solid #d0d0d0;     padding: 10px 12px;     overflow-y: auto; } .other_user_chat {     background: #b4b4b4;     margin-bottom: 10px;     padding: 10px;     width: fit-content;     font-size: 14px;     border-radius: 10px 0px 10px 10px;     color: #fff;     display: block;     word-break: break-word; } .current_user_chat {     background: #2695ee;     margin-bottom: 10px;     padding: 10px;     width: fit-content;     font-size: 14px;     border-radi...

How to create load more on scroll functionality in laravel?

Create load more on scroll functionality in laravel Main listing file <style> .notifications_page_cover_ui {     overflow: auto;     max-height: 474px; } </style> <div class="ps-section__right">     <div class="section-header">         <h3>Notifications</h3>     </div>     <div class="section-content">        <div class="notifications_page_cover_ui" id="load-more-container">         <?php echo $notification_list ?>        </div>     </div> </div> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script> $(document).ready(function() {     let lastNotificationID = {!! $lastNotificationID !!}; // Pass the last item ID from your controller or view     let loading = false;     function loadMoreData() {   ...