Iam using Laravel 8
i made all steps to change table->timestamp() to unix-timstamp but its return in '2022-10-10T21:09:28.000000Z'
in Model.php
class Post extends Model
{
HasFactory;
protected $dateFormat = 'U';
}
in create_post_table.php
$table->unsignedInteger('created_at');
$table->unsignedInteger('updated_at');
result in data base:
return response()->json result:
i need to return in '1665434137' format ??


strtotimefunction