1
我使用Laravel5 Carbon函數:從Carbon函數獲取日期Laravel 5
$ carbon_today = Carbon :: today();
DD($ carbon_today)後得到這樣的:
Carbon {#200 ▼
+"date": "2015-07-10 00:00:00"
+"timezone_type": 3
+"timezone": "UTC"
}
而且它是好的。現在我只需要使用CArbon中的日期來輸入變量。嘗試用foreach,
foreach ($carbon_today as $row) {
$x= $row['date'];
dd($x);
}
沒有更迭
$ carbon_today =碳::今日() - >格式( 'Y-M-d G:H:I');解決問題! TNX! – pavlenko