Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hsnch41's avatar

Time Condition

if ($request->start_time <= $request->end_time) { //how can i check this condition if my field type in database time.

}

0 likes
2 replies
hsnch41's avatar

solved by using strtotime() function.

    if (strtotime($request->start_time) >= strtotime($request->end_time))

{

}

Please or to participate in this conversation.