Search
 
SCRIPT & CODE EXAMPLE
 

PHP

carbon minus 1 day

Carbon::now()->subDays(1)
Comment

carbon date minus days

$users = Users::where('status_id', 'active')
           ->where( 'created_at', '>', Carbon::now()->subDays(30))
           ->get();


date('Y-m-d 00:00:00', strtotime("-30 days");
Comment

minus day from carbon date

$day = '2019-10-30 18:29:19';
$date = Carbon::createFromFormat('Y-m-d H:i:s', $day);
$date->subDay(); // Subtracts 1 day
echo $date->format('Y-m-d h:i:s');
Comment

PREVIOUS NEXT
Code Example
Php :: why use ob_start() in php 
Php :: php mysqli connection check 
Php :: how to install php fm 
Php :: php max_execution_time 
Php :: wordpress echo the excerpt 
Php :: node dockerfile 
Php :: check if table exists sql php 
Php :: php float 2 decimais 
Php :: typo3 debug 
Php :: php find differences between two arrays 
Php :: max execution time exceeded php 
Php :: php get client ip address 
Php :: string to double php 
Php :: php close window after script runs 
Php :: php get method name 
Php :: current timestamp carbon 
Php :: laravel updateorcreate 
Php :: Get PHP Date Time Difference in Days, Hours, Minutes, and Seconds 
Php :: click confirm before submit form php 
Php :: run laravel localhost network 
Php :: laravel generate slug 
Php :: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes 
Php :: send variable to get_template_part 
Php :: php read xml from url 
Php :: php calculate percentage 
Php :: laravel env google smtp 
Php :: laravel order by 
Php :: wordpress escape for html 
Php :: php format datetime 
Php :: wherebetween in laravel 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =