Fetch data year and month wise in laravel

             <?php              $datas = DB::table('order')             ->whereYear('created_at', '2021')             ->whereMonth('created_at', '04')             ->sum('total');             echo $datas; ?>

0 Comments

Calculator for invoice using javascript

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>                           <script>                 function totalPrice($val){                     let amt = 0;                     let arrlength = 1;                     let arr = document.getElementsByName('owner_shares');                     for(let index = 0; index < arr.length; index++){                         let price = arr[index].value;…

0 Comments

Duplicate form using jquery

<form class="duplicateForm">                     <div class="row duplicate my-3">                         <div class="col-12 col-sm-6 col-md-6 col-lg-4 col-xl-4">                             <lable>Fixed Cost</lable>                             <input type="number" name="owner_name[]" class="form-control owner_name" />                         </div>                           <div class="col-12 col-sm-6 col-md-6 col-lg-4 col-xl-4">                             <lable>Urgent Cost</lable>…

0 Comments

Where clause for date & time

In SQL, some problems require us to retrieve rows based on their dates and times. For such cases, we use the DATETIME datatype present in SQL. For this article, we…

0 Comments

Where in laravel

The where clause queries a database. In this shot, we will learn to use the where() query builder to query the database. This is an important and basic concept while writing a query in…

0 Comments