private function setCreatedAt(Carbon $createdAt = null)
    {
        if (is_null($createdAt)) {
            $createdAt = Carbon::now();
        }

        $this->createdAt = $createdAt;
    }
private function setCreatedAt(Carbon $createdAt = null)
    {
        if (is_null($createdAt)) {
            $createdAt = Carbon::now();
        }

        $this->createdAt = $createdAt;
    }
private function setCreatedAt ( Carbon $ createdAt = null ) { if ( is_null ( $ createdAt ) ) { $ createdAt = Carbon :: now ( ) ; } $ this -> createdAt = $ createdAt ; }
Set the creation date of the invoice, if null, set the current date.

@param Carbon $createdAt | null

@return void
Set the creation date of the invoice if null set the current date .