title: how to datetime table out convert date format in laravel?
body: <p><strong>I have datetime(2021-2-2 00-00-00)</strong></p>
  <p><strong>I want to output (2019/2/2)</strong></p>
  <p>I tried this code</p>
  <pre><code> @foreach($courseDetail as $course_detail)
   &lt;tr&gt;
       &lt;td&gt;{{$course_detail-&gt;course_name}}&lt;/td&gt;
       @if($course_detail-&gt;from_date != null)
        &lt;td&gt;{{$course_detail-&gt;from_date}}&lt;/td&gt;
       @else
       &lt;td&gt;{{$course_detail-&gt;purchase_date}}&lt;/td&gt;
       @endif
         &lt;td&gt;{{$course_detail-&gt;end_date-&gt;format('Y-m-d')}}&lt;/td&gt;
    &lt;/tr&gt;
  </code></pre>
  <p>@endforeach</p>