dimanche 20 septembre 2020

Laravel: Getting Orders between a certain time

I am bit a new to Laravel. I am trying to get a orders between a certain point in time. I have a variable $streamStartTime that is set early on to Carbon::now()->timestamp.

$streamStartTime = Carbon::now()->timestamp;

Later on, I call this:

 $streamPaidOrders = Order::->whereBetween('orders.created_at', [$streamStartTime, Carbon::now()]);

Would those 2 parameters give me orders between them or are they in different formats?



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

Aucun commentaire:

Enregistrer un commentaire