Answers for "laravel setting current date to a fix date"

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
6

get current date laravel

use Carbon\Carbon;
$date = Carbon::now();
Posted by: Guest on June-08-2020
2

laravel date default now

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

Code answers related to "laravel setting current date to a fix date"

Browse Popular Code Answers by Language