title: How to get the current date and time in YYYY-MM-DD HH: MM? LARAVEL 4
body: <p>I have a table <code>transaction</code>, inside there is column <code>order_on_sale</code> with default <code>value is 0</code>. Then i also have a table <code>config</code>, inside there is column <code>name</code> with two value that is <code>sale_start_date</code> and <code>sale_finish_date</code>. And there are also <code>time</code> columns with values ​<code>​2018-05-1 18:00</code> and <code>2018-05-31 18:00</code> <code>(YYYY-MM-DD HH: mm)</code>.
  <code>name</code> and <code>time</code> columns contained in the <code>config</code> table are interconnected,
  <code>sale_start_date = 2018-05-1 18:00</code>
  <code>sale_finish_date = 2018-05-31 18:00</code></p>
  
  <p>then when someone orders on <code>sale_start_date</code> and <code>sale_finish_date</code>, the <code>order_on_sale</code> column contained in <code>transaction</code> table will change its <code>value to 1</code>
  how do i get the current current time (YYYY-MM-DD HH: mm) to make the change?</p>
  
  <pre><code>$transaksi = new Transaction;
  $order_on_sale = 0;
  if (Config::get('sale_start_date') &amp;&amp; Config::get('sale_finish_date')) {
      $order_on_sale = 1;
  }
  $transaksi-&gt;order_on_sale = $order_on_sale;
  $transaksi-&gt;save();
  </code></pre>
  
  <p>Below is my code, but I am confused how to get the current date and time if I write such code</p>
  
  <p>thanks for the answers you provide</p>