Chat Notification using laravel

<?php  foreach ($msgs as $key => $msg) { $sender_id = $msg->sender_id; $usernameData = DB::table('users')->where('id', $sender_id)->get(); $OrderData = DB::table('service_checkout')->where('user_id', auth()->user()->id)->get(); $usernameDataCount = DB::table('chat_open')->where('reciver_id', auth()->user()->id)->count();   foreach ($usernameData as $key => $usrData)…

0 Comments

PHP – Ajax CRUD Operation

index.php <head> <title>CRUD Tutorial</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script> </head> <div style="padding:30px" class="container card"> <?php  if(isset($_GET['success'])){ ?> <div id="" style="padding:10px; background:green; color:white">…

0 Comments

Count todays, Current month and Current year data in Laravel

Fetch todays data <?php $today = date("d"); $todays_order = DB::table('service_checkout') ->whereDay('created_at', $today) ->count(); ?> Fetch current month data <?php $thismonth = date("m"); $todays_order = DB::table('service_checkout') ->whereMonth('created_at', $thismonth) ->count(); ?> Fetch…

0 Comments