How to use carbon to compare the same date in laravel code answer ,[year]

In this article, we will learn about how to use carbon to compare the same date in laravel code answer 1). Carbon difference between two dates 2). carbon compare the same date