public function registerViewComposers(): void
    {
        view()->composer('admin.module.rating::back.partials.analytics.statistic', function ($view) {
            $ratings = RatingModel::select(['rating', DB::raw('count(*) as total')])->groupBy('rating')->get();

            $view->with('ratings', $ratings);
        });
    }
public function registerViewComposers(): void
    {
        view()->composer('admin.module.rating::back.partials.analytics.statistic', function ($view) {
            $ratings = RatingModel::select(['rating', DB::raw('count(*) as total')])->groupBy('rating')->get();

            $view->with('ratings', $ratings);
        });
    }
public function registerViewComposers ( ) : void { view ( ) -> composer ( 'admin.module.rating::back.partials.analytics.statistic' , function ( $ view ) { $ ratings = RatingModel :: select ( [ 'rating' , DB :: raw ( 'count(*) as total' ) ] ) -> groupBy ( 'rating' ) -> get ( ) ; $ view -> with ( 'ratings' , $ ratings ) ; } ) ; }
Register Comments's view composers.

@return void
Register Comments s view composers .