Laravel: Select and Compare Data with Date

On

If you want to selecting a data with two date start date and end date in laravel so you can use given example below- Example 1: $start_date=carbon::parse($startDate)->format(“Y-m-d”); $end_date=carbon::parse($endDate)->format(“Y-m-d”); $query=User::query(); $query->whereDate(“created_at”,”>=”, $start_date); $query->whereDate(“created_at”,”<=”, $start_date); $query->get(); And If you want selecting a data with…

PHP 

PHP Data Type

On

PHP data type is used for storing a data in a different form and PHP support all types of data type as comparison other programming language such as- C, JAVA, .Net String Integer Float Boolean Array Object NULL Resource PHP String: A…

PHP 

PHP Variables Scope

On

PHP has three different of variable scopes local, global and static. Global variable declared outside a function has a GLOBAL SCOPE and can only be accessed outside a function: <?php $a = 5; // global scope variable function myFunction() { // You can’t…

PHP 

PHP Variables

On

PHP variable simple define with the $ sign, followed by the name of the variable and you can use this sign for define all types of variable. such as- <?php $name=’Hello world’; $number=20; $float=10.2; echo $name; echo $number; echo $float; ?> PHP…

error: