lundi 15 février 2021

Get data after start date laravel

I'm using the following query to get records that exist between start date and end date:

$event =Event::whereBetween('date', [
        $request->start_date, $request->end_date
    ])->orderBy('date', 'desc')->paginate(5);

This is working when I provide the start date and end date but, when I provide only the start date, then I didn't get any record – but I want records that exist after the start date if the end date is kept blank.

Any suggestions?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3qmF2MX
via IFTTT

Aucun commentaire:

Enregistrer un commentaire