【发布时间】:2017-06-05 07:07:05
【问题描述】:
我想为用户获取特定日期的所有条目。我不知道如何格式化查询。
public function getEntry()
{
$entries = Journal::where('id', '=', Auth::id())
->where('created_at', '=', '\Carbon\Carbon::now()->format("l j F Y")')
->get()->first();
return view('home')->with(compact('entries'));
}
我不知道如何格式化“created_at”以匹配服务器时间。任何帮助将不胜感激。谢谢。
【问题讨论】:
标签: php mysql laravel eloquent timestamp