use Carbon\Carbon;
$date = Carbon::parse('2018-04-16T07:03:06Z');
?
$date = '2018-04-16T07:03:06Z';
// in migration I have used
$table->timestampTz('my_date')->nullable();
//when creating record
$user = new User();
$user->my_date = $date; // how can change to mysql timestamp
$user->save()
How can i change it to Mysql timestamp when creating record in db. It should also preserve the timezone info with it.
Please help.
use Carbon\Carbon;
$date = Carbon::parse('2018-04-16T07:03:06Z');
?
Please or to participate in this conversation.