php - Could not parse '[{"created_at":"2021-11-20T15:14:28.000000Z"}]'. How can i parse a date to carbon?

Solution:

because you need to decode it first:

  $value= json_decode('[{"created_at":"2021-11-20T15:14:28.000000Z"}]')[0]->created_at;
  $parsedValue=Carbon::parse($value);

then you can use $parsedValue in your query as usual

Answer

Solution:

You can get a specific the column from the first row of a result set using the value query builder method. In your case:

$backlog = $ar->where('status', 0)->value('created_at');  

If your model is properly defined this should already be a Carbon instance or null if there are no results in the result set.

Source