I think the error is due to the format Carbon expect is not what am sending from the frontend but don't just know how to format this properly, battling with this for hours .
Please assists so i can move on
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have below in format in my model
/**
* format to date
*
* @param due_date
*/
public function setDueDateAttributes($due_date)
{
$this->attributes['due_date'] = Carbon::createFromFormat('d/m/Y', $due_date);
}
and my code:
<div class="input-group date" id="datetimepicker2">
<input type="text" name="due_date" class="form-control">
<span class="input-group-addon"><span class="glyphicon glyphicon-calender"></span</span>
</div>
$("#datetimepicker2").datetimepicker({
locale: "en-au"
});
Everything works well not until i tried to use the datepicker pluggin because i need time to be set along with date
I got the error: InvalidArgumentException in Carbon.php line 425: Unexpected data found. Unexpected data found. A two digit minute could not be found Trailing data
Please or to participate in this conversation.