title: Adding time field to the current date field using Carbon
body: <p><strong>Problem:</strong> I'm making some sort of to-do application in Laravel, so for each to-do a user creates there will be a given time from the user to indicate when this to-do has to be completed. Now I have 2 input fields, 1 for the date and 1 for the specific time. I want to add the time input to the date input and when that is completed I want it to store in the database</p>
  
  <p><strong>Question:</strong> How do I add my time field value to my date value?</p>
  
  <p><strong>Code:</strong></p>
  
  <p><strong>The input fields:</strong> </p>
  
  <pre><code>{{Form::date('date', \Carbon\Carbon::today(),['class' =&gt; 'form-control mb-2 mr-sm-2 mb-sm-0'])}}
  {{Form::time('time', \Carbon\Carbon::now()-&gt;timezone('Europe/Brussels')-&gt;format('H:i'),['class' =&gt; 'form-control'])}}
  </code></pre>
  
  <p><strong>My store function when the user wants to add a task:</strong></p>
  
  <pre><code> public function store(Request $request)
   {
  
      $this -&gt;validate($request, ['title' =&gt; 'required|max:25','description' =&gt; 'required|max:60']);
  
      $task = new Task;
      $task -&gt; title = $request-&gt;input('title');
      $task -&gt; description = $request-&gt;input('description');
      $task -&gt; end_date = $request-&gt;input('date');
      $task -&gt; user_id = auth()-&gt;id();
      $task-&gt;save();
  
      return redirect('/tasks')-&gt;with('success', 'Task created');
   }
  </code></pre>
  
  <p><strong>My Task.php model where I try to manipulate the 'end_date' attribute:</strong></p>
  
  <pre><code>    public function setEndDateAttribute($date) 
      {
  
      $this-&gt;attributes['end_date'] = Carbon::createFromFormat('Y-m-d', $date);
  
      }
  </code></pre>
  
  <p>The result I'm getting: Date is being added to the database, but with above function I get the date + current time of creating the task. I want to replace current time with my input value of time</p>