title: laravel 5 insert date and time to database
body: <p>I want to insert the current date(date and time) along with my form inputs on laravel 5 or 5.1 only. I have this code in <code>PatientController.php</code> but I'm not sure on how to include the current date.</p>
  <pre><code>public function create(Patient $patient, Request $request)
  {
      // $post = $request-&gt;all();
  
      $data = [
          'pName' =&gt; $request['fname'],
          'pAddress' =&gt; $request['address'],
          'pBday' =&gt; $request['bday'],
          'pPhone' =&gt; $request['phone'],
          'pEcon' =&gt; $request['econ'],
          'pDreg' =&gt; dateTime('created_at')
      ];
  
      $patient-&gt;insert($data);
  
      return redirect('patient');
  }
  </code></pre>