I am using the following code.
$request->hour= 10:00:00 $parameters->hour=strtotime(date(" H:i:s",$request->hour));
I am getting the following error.
A non well formed numeric value encountered
Try $parameters->hour=date("H:i:s",strtotime($request->hour));
$parameters->hour=date("H:i:s",strtotime($request->hour));
or if you want $parameters->hour=strtotime(date("H:i:s",strtotime($request->hour)));
$parameters->hour=strtotime(date("H:i:s",strtotime($request->hour)));
Well you have to try this:
$hour = "10:00:00"; $parameters->hour = strtotime(date("H:i:s",strtotime($hour)));
or you can use carbon
\Carbon\Carbon::parse($hour)->format("H:i:s");