Eloquent: get only the date from timestamp

Viewed 1144

I want to get all the entries of a specific day for a user.. I don't know how to format the query.

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'));
}

I do not know how to format that 'created_at' to match the server time. Any help will be largely appreciated. Thank You.

1 Answers
Related