Using Carbon with laravel 5.6.

I want write a code that give me next occurrence of date from current date.   

E.g Give next 31st May date  

Scenario 1 :   

Input : $currentDate = '01-30-2019'; // MM-DD-YYYY format   

Expected Output: $next31May = '05-31-2019';   

Scenario 2 :   

Input : $currentDate = '07-04-2019'; // MM-DD-YYYY format   

Expected Output: $next31May = '05-31-2020';   

Update:

I tried below code but not satisfy 

```
<?php
public function nextOccurance()
{
    $now = Carbon::now();
    $month= $now->month;
    $year = $now->year;
    if($month > 6)
    {
         echo Carbon::createMidnightDate($year+1, 5, 31);
    }
    else
    {
        echo Carbon::createMidnightDate(null, 5, 31);
    }
    exit();
}
?>

```

Thank You in advance.