EMfinanga
11 months ago
275
2
Laravel

function of select data in date range whereBetween

Posted 11 months ago by EMfinanga

someone can assist me the query to select data range by date.

i want a user input a date., How can i rebuild my query?

public function salesreport()
{

    $sales = Sales::select("sales.*")
    ->whereBetween('created_at', ['2019-09-01', '2019-09-10'])->get();

return view('reports.salesreport'); }

Please sign in or create an account to participate in this conversation.