function checkDate($value, $parameters, $validator, $direction)
    {
        $comparisonField = $this->getComparisonField($parameters);
        $dateFormat = $this->getDateFormat($parameters);


        $comparisonFieldValue = $this->getComparisonValue($validator, $comparisonField);

        if ($this->canCompare($value, $comparisonFieldValue)) {
            $dateFormat = 'Y-m-d';

            return Carbon::createFromFormat($dateFormat, $value)->{$direction}(
                Carbon::createFromFormat($dateFormat, $comparisonFieldValue)
            );
        }

        return true;
    }
function checkDate($value, $parameters, $validator, $direction)
    {
        $comparisonField = $this->getComparisonField($parameters);
        $dateFormat = $this->getDateFormat($parameters);


        $comparisonFieldValue = $this->getComparisonValue($validator, $comparisonField);

        if ($this->canCompare($value, $comparisonFieldValue)) {
            $dateFormat = 'Y-m-d';

            return Carbon::createFromFormat($dateFormat, $value)->{$direction}(
                Carbon::createFromFormat($dateFormat, $comparisonFieldValue)
            );
        }

        return true;
    }
function checkDate ( $ value , $ parameters , $ validator , $ direction ) { $ comparisonField = $ this -> getComparisonField ( $ parameters ) ; $ dateFormat = $ this -> getDateFormat ( $ parameters ) ; $ comparisonFieldValue = $ this -> getComparisonValue ( $ validator , $ comparisonField ) ; if ( $ this -> canCompare ( $ value , $ comparisonFieldValue ) ) { $ dateFormat = 'Y-m-d' ; return Carbon :: createFromFormat ( $ dateFormat , $ value ) -> { $ direction } ( Carbon :: createFromFormat ( $ dateFormat , $ comparisonFieldValue ) ) ; } return true ; }
Check the date

@param $value
@param $parameters
@param $validator
@param $direction
@return bool
Check the date