$startDate = Carbon::now(); //returns current day
$firstDay = $startDate->firstOfMonth();
Carbon::tomorrow()->format('l');
use CarbonCarbon;
Carbon::now()->format("l") // today's day name. example: Sunday
public function myMonthApts()
{
return $this->appointments()
->whereIn('status_id', [3,4])
->whereYear('created_at', Carbon::now()->year)
->whereMonth('created_at', Carbon::now()->month)
->count();
}
$period = CarbonPeriod::create($startDate, $endDate);
foreach($period as $date)
{
$dates[] = $date->format('d-m-Y');
}
Code Example |
---|
Php :: get curret timedate php |
Php :: json encode decode php |
Php :: shortcode php wordpress |
Php :: end foreach loop |
Php :: laravel validate date |
Php :: php check if string contains url |
Php :: laravel where on relationsship column |
Php :: string match percentage php |
Php :: run schedule laravel |
Php :: yii2 clear schema cache |
Php :: laravel exist |
Php :: php count occurrences of string in array |
Php :: yesterday php |
Php :: php number to words |
Php :: php remove non utf-8 characters |
Php :: php logout |
Php :: woocommerce hook after order placed |
Php :: php ++ |
Php :: increase php_values |
Php :: how to show image in laravel |
Php :: how to get data from json array in php |
Php :: wpml get site url |
Php :: generate entities symfony |
Php :: update wordpress query |
Php :: distinct laravel not working |
Php :: laravel create controller |
Php :: php undefined function mysqli_fetch_all() |
Php :: laravel attach |
Php :: check the route type in laravel |
Php :: Carbon Add Years To Date In Laravel |