public function getFormattedExpirationDate()
    {
        $date = $this->model->getExpirationDate();

        if ($date instanceof Carbon) {
            $isFuture   = $date->isFuture();
            $translated = $isFuture ? $date->diffForHumans(null, true) : $date->diffForHumans();

            if ($isFuture) {
                $translated = 'in ' . $translated;
            }

            return $translated;
        }

        return '---';
    }
public function getFormattedExpirationDate()
    {
        $date = $this->model->getExpirationDate();

        if ($date instanceof Carbon) {
            $isFuture   = $date->isFuture();
            $translated = $isFuture ? $date->diffForHumans(null, true) : $date->diffForHumans();

            if ($isFuture) {
                $translated = 'in ' . $translated;
            }

            return $translated;
        }

        return '---';
    }
public function getFormattedExpirationDate ( ) { $ date = $ this -> model -> getExpirationDate ( ) ; if ( $ date instanceof Carbon ) { $ isFuture = $ date -> isFuture ( ) ; $ translated = $ isFuture ? $ date -> diffForHumans ( null , true ) : $ date -> diffForHumans ( ) ; if ( $ isFuture ) { $ translated = 'in ' . $ translated ; } return $ translated ; } return '---' ; }
Returns the formatted expiration date.

@return string
Returns the formatted expiration date .