I'm using the bootstrap datepicker, to insert a date into the db, but in order to use carbon, so I convert the date before inserting it into the db using
$input['date'] = Carbon::createFromFormat('m/d/Y', $request->date)->format('Y-m-d');
My problem is when I go to the edit page, my date field cannot be populated, because the date is a carbon instance, so I'm trying to convert it back to m/d/Y format for editing. here's my form
{!! Form::text('date', $meetings->date, array('class' => 'form-control', 'input-group date', 'id' => 'datetimepicker', 'required' => 'required')) !!}
I've tried using several ideas
$meetings->date->format('Y-m-d')
format('Y-m-d', $meetings->date)
And several other ways.
So how can I get the date in the correct format to populate the field?