Answers for "laravel date now in blade"

PHP
1

get current date laravel

use Carbon\Carbon;
$date = Carbon::now();
//Get date and time
$date->toDateTimeString();
//Get date
$date->toDateString();
Posted by: Guest on December-04-2020
2

laravel date default now

$table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
Posted by: Guest on February-26-2021

Browse Popular Code Answers by Language