如何在 laravel 控制器中从检索结束日期数据开始 +1 天?
How to +1 day from retrive endDate data in laravel controller?
I want to get enddate by + 1 day
$data=[
"title" =>$event->event_name,
"start" =>$event->start_date,
"end" =>new \DateTime($event->end_date.'1 day'),
"textColor" =>"white",
"backgroundColor" =>"black",
];
但是代码使全日历不在视图中显示任何数据
如何让它工作 + 1 天?
之前谢谢
试试这个代码吧。
<?php
$data=[
"title" => $event->event_name,
"start" => $event->start_date,
"end" => date('Y-m-d H:i:s', strtotime($event->end_date . ' +1 day')),
"textColor" => "white",
"backgroundColor" => "black",
];
?>
I want to get enddate by + 1 day
$data=[
"title" =>$event->event_name,
"start" =>$event->start_date,
"end" =>new \DateTime($event->end_date.'1 day'),
"textColor" =>"white",
"backgroundColor" =>"black",
];
但是代码使全日历不在视图中显示任何数据 如何让它工作 + 1 天? 之前谢谢
试试这个代码吧。
<?php
$data=[
"title" => $event->event_name,
"start" => $event->start_date,
"end" => date('Y-m-d H:i:s', strtotime($event->end_date . ' +1 day')),
"textColor" => "white",
"backgroundColor" => "black",
];
?>