How to change day of date format PHP/laravel
<pre><code>public function store(ContractRequest $request,$operatorId)
{
 //dd($request-&gt;all());

    $contractData = $request-&gt;all();
    $contractData['operator_id'] = $operatorId;

    if ($this-&gt;contract-&gt;create($contractData)) {
        return redirect()-&gt;route('admin.operator.{id}.contracts.index',[$operatorId])-&gt;with('success', 'Contract
        successfully
        created.');

    }

        return redirect()-&gt;route('admin.contracts.index')-&gt;with('error', 'Contract could not be created.');
    }
</code></pre>

<p>my view:</p>

<pre><code>&lt;div class="form-group"&gt;
    {!! Form::label('title', 'Start Date:', ['class'=&gt;'col-sm-2 control-label'])!!}
    &lt;div class="col-sm-7"&gt;
        {!! Form::date('start_date',null, ["class"=&gt;"form-control",'required'])!!}
    &lt;/div&gt;
&lt;/div&gt;

&lt;div class="form-group"&gt;
    {!! Form::label('title', 'End Date:', ['class'=&gt;'col-sm-2 control-label'])!!}
    &lt;div class="col-sm-7"&gt;
        {!! Form::date('end_date',null, ["class"=&gt;"form-control"])!!}
    &lt;/div&gt;
&lt;/div&gt;

&lt;div class="form-group"&gt;
    {!! Form::label('title', 'Remarks:', ['class'=&gt;'col-sm-2 control-label'])!!}
    &lt;div class="col-sm-7"&gt;
        {!! Form::textarea('remark',null, ["class"=&gt;"form-control",'cols'=&gt;'10','rows'=&gt;'5'])!!}
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>my question :This is contract form and generally <code>contract</code> start form <code>01</code> day end at <code>30,29 or 31</code> day of month.
if user select <code>2016-2-4</code> as <code>start date</code> and <code>2017-05-31</code> <code>as end date</code> then start date should be saved as 2016-2-<code>1</code>.How can make this ,start date day should always be one ie<code>1</code></p>

<p>start data <code>2016-o2-o4 should be saved as</code>2016-02-01 ie <code>1</code> at end for day</p>