You need to only pass the actual created_at value to Carbon::parse(). Right now from what I can see you're passing a collection since ->get() returns a collection.
@munazzil Seriously? toArray() gives you an array, not a collection. I mean it's even in the name... And also, Carbon is not a collection, so it won't have that method anyways.
Try using Eloquent models instead of the query builder. All created_at/updated_at timestamps are automatically converted to carbon instances when you retrieve them from the db. There is no need to manually parse them. It also makes it very easy to add other custom date/datetime columns that you may have in a table so they are automatically converted to carbon instances as well. Eloquent is a lot more powerful than the simple, basic query builder that you are using.