protected function recountRatingOfModelType($modelType)
    {
        $modelType = $this->normalizeModelType($modelType);

        $counters = $this->service->fetchRatesCounters($modelType);

        $this->service->removeRatingTotalOfType($modelType);

        DB::table(app(RatingTotalModelContract::class)->getTable())->insert($counters);

        $this->info('All [' . $modelType . '] ratings has been recounted.');
    }
protected function recountRatingOfModelType($modelType)
    {
        $modelType = $this->normalizeModelType($modelType);

        $counters = $this->service->fetchRatesCounters($modelType);

        $this->service->removeRatingTotalOfType($modelType);

        DB::table(app(RatingTotalModelContract::class)->getTable())->insert($counters);

        $this->info('All [' . $modelType . '] ratings has been recounted.');
    }
protected function recountRatingOfModelType ( $ modelType ) { $ modelType = $ this -> normalizeModelType ( $ modelType ) ; $ counters = $ this -> service -> fetchRatesCounters ( $ modelType ) ; $ this -> service -> removeRatingTotalOfType ( $ modelType ) ; DB :: table ( app ( RatingTotalModelContract :: class ) -> getTable ( ) ) -> insert ( $ counters ) ; $ this -> info ( 'All [' . $ modelType . '] ratings has been recounted.' ) ; }
Recount rating of model type.

@param string $modelType
@return void

@throws \InetStudio\Rating\Exceptions\ModelInvalidException
Recount rating of model type .