Level 6
use Carbon API
$jj= new HH();
$jj->date = Carbon\Carbon::now();
$jj->save();
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
public function hjk() {
$jj= new HH();
$date = date("Y-m-d", time());
$date = trim($date);
$time = strtotime($date);
$jj->date = $time;
$jj->save();
}
not saving the current date, any help? am getting date saved with string not in date format
Please or to participate in this conversation.