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; ?>
<?php $datas = DB::table('order') ->whereYear('created_at', '2021') ->whereMonth('created_at', '04') ->sum('total'); echo $datas; ?>
<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;…
<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>…
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…
Friends, in where condition and like operator both are very important to fetch the data in any Laravel query and it is very useful not only in laravel but also…
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…