protected function recountRatingOfAllModelTypes()
    {
        $rateableTypes = app(RatingModelContract::class)->select(['rateable_type'])->groupBy('rateable_type')->get();

        foreach ($rateableTypes as $rating) {
            $this->recountRatingOfModelType($rating->rateable_type);
        }
    }
protected function recountRatingOfAllModelTypes()
    {
        $rateableTypes = app(RatingModelContract::class)->select(['rateable_type'])->groupBy('rateable_type')->get();

        foreach ($rateableTypes as $rating) {
            $this->recountRatingOfModelType($rating->rateable_type);
        }
    }
protected function recountRatingOfAllModelTypes ( ) { $ rateableTypes = app ( RatingModelContract :: class ) -> select ( [ 'rateable_type' ] ) -> groupBy ( 'rateable_type' ) -> get ( ) ; foreach ( $ rateableTypes as $ rating ) { $ this -> recountRatingOfModelType ( $ rating -> rateable_type ) ; } }
Recount rating of all model types.

@return void

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