public function reduce($feature, $uses = 1)
    {
        $feature = new Feature($feature);

        $usage = $this->subscription
            ->usage()
            ->byFeatureCode($feature->getFeatureCode())
            ->first();

        if (is_null($usage)) {
            return false;
        }

        $usage->used = max($usage->used - $uses, 0);

        $usage->save();

        return $usage;
    }
public function reduce($feature, $uses = 1)
    {
        $feature = new Feature($feature);

        $usage = $this->subscription
            ->usage()
            ->byFeatureCode($feature->getFeatureCode())
            ->first();

        if (is_null($usage)) {
            return false;
        }

        $usage->used = max($usage->used - $uses, 0);

        $usage->save();

        return $usage;
    }
public function reduce ( $ feature , $ uses = 1 ) { $ feature = new Feature ( $ feature ) ; $ usage = $ this -> subscription -> usage ( ) -> byFeatureCode ( $ feature -> getFeatureCode ( ) ) -> first ( ) ; if ( is_null ( $ usage ) ) { return false ; } $ usage -> used = max ( $ usage -> used - $ uses , 0 ) ; $ usage -> save ( ) ; return $ usage ; }
Reduce usage.

@param string $feature
@param int $uses
@return \Gerardojbaez\Laraplans\Models\PlanSubscriptionUsage
Reduce usage .